SuccessChanges

Summary

  1. [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size (details)
  2. Check for nullptr before dereferencing in translateModuleToLLVMIR() (details)
  3. [BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC (details)
  4. [mlir][CAPI] Add missing 'static' to inline C function. (details)
  5. [BranchProbabilityInfo] Remove block handles in eraseBlock() (details)
Commit 247c5b5d69631c9f5fce9bf914f09f84e5cf8232 by i
[test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D90874
The file was modifiedclang/test/Modules/diagnose-missing-import.m
The file was modifiedclang/test/Sema/vecshift.c
The file was modifiedclang/test/Sema/implicit-decl.c
Commit 2af37cf7ffc43daa9523f209050761039c29964b by joker.eph
Check for nullptr before dereferencing in translateModuleToLLVMIR()

This is defensive with respect to invocations of this API with an IR
that isn't ready to be converted to LLVM IR.
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
Commit 4931158d27dcf1842b12d49f56ed5dede9c292fd by yrouban
[BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC

This refactoring allows to eliminate the MaxSuccIdx map
proposed in the commit a7b662d0.
The idea is to remove probabilities for a block BB for
all its successors one by one from first, second, ...
till N-th until they are defined in Probs. This works
because probabilities for the block are set at once for
all its successors from number 0 to N-1 and the rest
are removed if there were stale probs.
The protected method setEdgeProbability(), which set
probabilities for individual successor, is removed.
This makes it clear that the probabilities are set in
bulk by the public method with the same name.

Reviewed By: kazu, MaskRay

Differential Revision: https://reviews.llvm.org/D90837
The file was modifiedllvm/lib/Analysis/BranchProbabilityInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/BranchProbabilityInfo.h
Commit 60e2c5b03b590fbb1477d3d7170d5bd434b39ce9 by stellaraccident
[mlir][CAPI] Add missing 'static' to inline C function.

* Asked to submit separately from https://reviews.llvm.org/D90824
The file was modifiedmlir/include/mlir-c/Support.h
Commit e38c8e7590a0a82be24f3bcc5b87736498f2cb07 by yrouban
[BranchProbabilityInfo] Remove block handles in eraseBlock()

BranchProbabilityInfo::eraseBlock() is a public method and
can be called without deleting the block itself.
This method is made remove the correspondent tracking handle
from BranchProbabilityInfo::Handles along with
the probabilities of the block. Handles.erase() call is moved
to eraseBlock().
In setEdgeProbability() we need to add the block handle only once.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D90838
The file was modifiedllvm/lib/Analysis/BranchProbabilityInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/BranchProbabilityInfo.h