Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 188143 Build 284345: arc lint + arc unit
Event Timeline
Comment Actions
Needs a test. Could be an update to an existing test, if there's an appropriate one that's easy to modify.
Please specify at least one reviewer. There are some hints for choosing one here: https://llvm.org/docs/Contributing.html#format-patches
Comment Actions
& also, I assume/but would like confirmed that this new instruction will for sure be going into the same BB as the old instruciton?(so there are no hoisting/profile problem concerns)
Comment Actions
Good question!
Yes it's going exactly in the same place. The code surrounding the setDebugLoc is the following:
if (Instruction *I = dyn_cast<Instruction>(V)) { Value *NewV = cloneInstructionWithNewAddressSpace( I, NewAddrSpace, ValueWithNewAddrSpace, PredicatedAS, UndefUsesToFix); if (Instruction *NewI = dyn_cast_or_null<Instruction>(NewV)) { if (NewI->getParent() == nullptr) { NewI->insertBefore(I); NewI->takeName(I); NewI->setDebugLoc(I->getDebugLoc()); } } }
Comment Actions
- Add test for InferAddressSpaces DILocation propagation
- Fix NVPTX test: the debug_loc is maintained for instructions issued from the gep inst
llvm/test/Transforms/InferAddressSpaces/AMDGPU/debug-info.ll | ||
---|---|---|
42 ↗ | (On Diff #463196) | Can you add another test for cases handled by rewriteIntrinsicWithAddressSpace? In particular ptrmask and is_shared could be interesting |
Comment Actions
- Added test cases and a fix:
- Test: with ptrmsk
- Test: with is.shared and assume
- Fix: Use the debug_loc from the insert-point when creating a new addrspacecast