Skip to content

Commit 05f4e4e

Browse files
committed
address comment
1 parent 431f4f7 commit 05f4e4e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ void NVPTXPassConfig::addAddressSpaceInferencePasses() {
302302
// be eliminated by SROA.
303303
addPass(createSROAPass());
304304
addPass(createNVPTXLowerAllocaPass());
305+
// TODO: Consider running InferAddressSpaces during opt, earlier in the
306+
// compilation flow.
305307
addPass(createInferAddressSpacesPass());
306308
addPass(createNVPTXAtomicLowerPass());
307309
}

llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ static std::optional<bool> evaluateIsSpace(Intrinsic::ID IID, unsigned AS) {
442442

443443
// Returns an instruction pointer (may be nullptr if we do not know the answer).
444444
// Returns nullopt if `II` is not one of the `isspacep` intrinsics.
445+
//
446+
// TODO: If InferAddressSpaces were run early enough in the pipeline this could
447+
// be removed in favor of the constant folding that occurs there through
448+
// rewriteIntrinsicWithAddressSpace
445449
static std::optional<Instruction *>
446450
handleSpaceCheckIntrinsics(InstCombiner &IC, IntrinsicInst &II) {
447451

0 commit comments

Comments
 (0)