[PATCH] D45022: [X86] Mark all byval parameters as aliased

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 06:10:43 PDT 2018


jmorse created this revision.
Herald added a subscriber: llvm-commits.

The formal LLVM IR Value * to the function is guaranteed to alias this stack slot, thus later rescheduling optimisations of accesses to this stack slot may be aliased and unsafe. See: PR30290


Repository:
  rL LLVM

https://reviews.llvm.org/D45022

Files:
  lib/Target/X86/X86ISelLowering.cpp


Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -2833,7 +2833,7 @@
   if (Flags.isByVal()) {
     unsigned Bytes = Flags.getByValSize();
     if (Bytes == 0) Bytes = 1; // Don't create zero-sized stack objects.
-    int FI = MFI.CreateFixedObject(Bytes, VA.getLocMemOffset(), isImmutable);
+    int FI = MFI.CreateFixedObject(Bytes, VA.getLocMemOffset(), isImmutable, true);
     // Adjust SP offset of interrupt parameter.
     if (CallConv == CallingConv::X86_INTR) {
       MFI.setObjectOffset(FI, Offset);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45022.140217.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180329/e4696878/attachment.bin>


More information about the llvm-commits mailing list