Skip to content

Commit

Permalink
Integrate LLVM at llvm/llvm-project@a98c2940dbc0
Browse files Browse the repository at this point in the history
Updates LLVM usage to match
[a98c2940dbc0](llvm/llvm-project@a98c2940dbc0)

PiperOrigin-RevId: 731312767
  • Loading branch information
d0k authored and copybara-github committed Feb 26, 2025
1 parent 8a147ee commit 1273e41
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bazel/import_llvm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load(

def import_llvm(name):
"""Imports LLVM."""
LLVM_COMMIT = "9889de834b0a9fa4a5a222a81a524c75977e41d4"
LLVM_COMMIT = "a98c2940dbc04bf84de95cb1893694cdcbc4f5fe"

new_git_repository(
name = name,
Expand Down
28 changes: 28 additions & 0 deletions patches/llvm.patch
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
Auto generated patch. Do not edit or delete it, even if empty.
diff -ruN --strip-trailing-cr a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -984,6 +984,7 @@

LiveRegMap::iterator LRI = findLiveVirtReg(VirtReg);
MCPhysReg PhysReg;
+ bool IsRenamable = true;
if (LRI != LiveVirtRegs.end() && LRI->PhysReg) {
PhysReg = LRI->PhysReg;
} else {
@@ -997,6 +998,7 @@
// basic.
PhysReg = getErrorAssignment(*LRI, *MO.getParent(), RC);
LRI->Error = true;
+ IsRenamable = false;
} else
PhysReg = AllocationOrder.front();
}
@@ -1007,7 +1009,7 @@
MO.setSubReg(0);
}
MO.setReg(PhysReg);
- MO.setIsRenamable(!LRI->Error);
+ MO.setIsRenamable(IsRenamable);
}

/// Variation of defineVirtReg() with special handling for livethrough regs

0 comments on commit 1273e41

Please sign in to comment.