[PATCH] D79537: Add NoMerge MIFlag to avoid MIR branch folding
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 14:10:10 PDT 2020
zequanwu added a comment.
In D79537#2035041 <https://reviews.llvm.org/D79537#2035041>, @rnk wrote:
> After this lands, can you follow this up by migrating the sanitizer passes to using the attribute instead of using empty inline asm blobs? Send the patch to @vitalybuka. This is the code I'm thinking of:
> https://github.com/llvm/llvm-project/blob/028bfdd8913616f7a3e57e8ef5c2a9990e528ff0/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp#L1626
> https://github.com/llvm/llvm-project/blob/d6695e18763a05b30cb336c18157175277da8f4b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp#L864
> ... and any similar uses.
>
> Run `check-asan`, `check-msan`, etc to run the sanitizer integration tests, and confirm that they pass. You can run `check-all` to run everything and be sure as well.
Sure, I will do after this lands.
================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:109
// floatint-point exceptions.
+ NoMerge = 1 << 15, // Instruction should not be merged
};
----------------
rnk wrote:
> arsenm wrote:
> > It's not obvious to me what this means. These are also supposed to be droppable optimization flags, but it seems like you're using this for something semantically required?
> I don't think `BundledPred` or `FrameSetup` are droppable, IMO they are semantically significant.
>
> The only alternative I see to this would be to encode this information in the MCInstrDesc, which would require mirroring the entire family of X86 CALL instructions, of which there are many.
This `NoMerge` flag is used to disable branch-fold optimization when present. What do you mean something semantically required?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79537/new/
https://reviews.llvm.org/D79537
More information about the llvm-commits
mailing list