[PATCH] D41832: LLParser: Do not check alloca addr space if the assembly does not contain data layout definition
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 12:36:33 PST 2018
yaxunl added inline comments.
================
Comment at: lib/AsmParser/LLParser.cpp:6181-6185
+ if (AS != AddrSpace) {
+ // TODO: In the future it should be possible to specify addrspace
+ // per-alloca.
+ return Error(ASLoc, "address space must match datalayout");
+ }
----------------
arsenm wrote:
> The idea was to remove this check from the parser entirely
Removing this check will cause some lit tests to fail since the verifier output different error messages.
The error message from the parser is better since it contains line/column number. Should we keep the check if the assembly contains data layout definition?
================
Comment at: lib/IR/Verifier.cpp:3210
+ PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
+ "Allocation instruction pointer not in the stack address space!", &AI);
Assert(AI.getAllocatedType()->isSized(&Visited),
----------------
arsenm wrote:
> s/stack/DataLayout alloca/
will fix.
https://reviews.llvm.org/D41832
More information about the llvm-commits
mailing list