mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 04:32:09 +00:00
[RS4GC] Remove a redundant linear search, NFCI
Since LiveVariables is uniqued (we just created it from a `DenseSet`), `FindIndex(LiveVariables, LiveVariables[i])` is always `i`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3d31aca999
commit
35072eb786
@ -1342,8 +1342,7 @@ static void CreateGCRelocates(ArrayRef<Value *> LiveVariables,
|
||||
// Generate the gc.relocate call and save the result
|
||||
Value *BaseIdx =
|
||||
Builder.getInt32(LiveStart + FindIndex(LiveVariables, BasePtrs[i]));
|
||||
Value *LiveIdx =
|
||||
Builder.getInt32(LiveStart + FindIndex(LiveVariables, LiveVariables[i]));
|
||||
Value *LiveIdx = Builder.getInt32(LiveStart + i);
|
||||
|
||||
// only specify a debug name if we can give a useful one
|
||||
CallInst *Reloc = Builder.CreateCall(
|
||||
|
Loading…
x
Reference in New Issue
Block a user