Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 188172
Event Timeline
llvm/include/llvm/Support/TargetOpcodes.def | ||
---|---|---|
395 | Why is this marker needed? Should OP_END be sufficient to pair with OP_START? |
llvm/include/llvm/Support/TargetOpcodes.def | ||
---|---|---|
395 | Yes it's not, OP_START and OP_END should be sufficient, will update |
What's this going to be used for?
llvm/include/llvm/Support/TargetOpcodes.def | ||
---|---|---|
395 | Why doesn't G_FENCE count? |
Atomic instructions are inherently divergent, uniformity analysis need to identify these instructions to mark them divergent
llvm/include/llvm/Support/TargetOpcodes.def | ||
---|---|---|
395 | I have a doubt too, could not find details about this instruction. Should this also be included? |
I don't know how much use a general "isAtomic" predicate will be. You wouldn't really do anything with the same operand indices for all of them. An isAtomicRMW would be more useful?
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
114 | Opc >= START? |
It will need to be "isAtomicRead" to include AtomicLoad and AtomicRMW. Basically any atomic operation that returns a value. We assume that by its very nature of being atomic, the returned value can be different in each thread. Fence is not relevant for this use-case since it does not access memory or return anything; it merely orders operations within the same thread.
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
118–121 | I think the benefit of this one is dubious. They don't have the same operand structure |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
118–121 | We need this to check divergence of an instruction in GMIR, it was either this or moving this opcode matching inside isDivergent type function which didn't look right and also wasn't consistent with how Atomic instructions are handled in IR divergence/uniformity analysis. |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
118–121 | There's nothing wrong with just checking opcodes where you need to. The IR and MIR aren't structured exactly the same way |
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
118–121 |
Okay. I'll get rid of the second predicate, maybe when the divergence revision comes up we can revisit this if that doesn't look right |
Opc >= START?