Why not putting this change into BranchProbablityInfo.cpp, so that other components can benefit from the more precise BP info?
@dsanders - the main goal was to avoid the compiler warning of having to create a zero sized array. Now with the splitting of arguments, we can also accept MachineOperands which can directly be added to the instruction.
Add the ability to accept machine operands to the buildInstr method so it will directly call MIB.add(MO) on that.
LGTM, thanks for working on this!
Should we look at whether the size is statically known?
I think the need for this may actually reveal a deeper issue. Only the address range for the first executable section will be added to the suppression. The two ways around that would be to 1) allow the suppression to take multiple ranges or 2) don't use sections in procmaps for executable segments (lsan doesn't care about executable segments anyway)
Hi Daniel - having these methods would let me use them in https://reviews.llvm.org/D35737. Right now they are not related.
A few more nits.
Thanks, Michael. This LGTM pending @RKSimon's re-review. But can you please update your sources so that we can see how you merged with https://reviews.llvm.org/D35638, since that will cause conflicts?
Ping, Gerolf, are you OK with this?
Here is the current output:
LG. Thank you for the fix!
Thank you. This is really nice idea. Do you have some cost modeling for when to allow this forwarding?
Sorry, I just noticed this weeks later. Why are we adding this to --version instead of adding some new flag for printing this? When I pass --version, I'm usually interested in clang's version and don't need a screenful of other information below it (which makes the output I do care about scroll off the screen).
LGTM but please test with assertions on :)