[clang-tools-extra] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 26 09:02:08 PDT 2023


================
@@ -574,8 +574,8 @@ class X86InstrInfo final : public X86GenInstrInfo {
                      outliner::Candidate &C) const override;
 
   void buildClearRegister(Register Reg, MachineBasicBlock &MBB,
-                          MachineBasicBlock::iterator Iter,
-                          DebugLoc &DL) const override;
+                          MachineBasicBlock::iterator Iter, DebugLoc &DL,
+                          bool NoSideEffects = false) const override;
----------------
nickdesaulniers wrote:

who calls buildClearRegister with this new default param set to true?

also, I fear double negatives here. Would it be clearer to call this `SideEffects` and default to `true`?

https://github.com/llvm/llvm-project/pull/67193


More information about the cfe-commits mailing list