[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:25:31 PST 2018


yaxunl created this revision.
yaxunl added a reviewer: arsenm.
Herald added subscribers: kristof.beyls, nhaehnle, wdng, aemerson.

Sometimes users do not specify data layout in LLVM assembly and let llc set the data layout by target triple after loading the LLVM assembly.

Currently the parser checks alloca address space no matter whether the LLVM assembly contains data layout definition, which causes false alarm since the default data layout does not contain the correct alloca address space.

This patch disables checking alloca address space in LLVM parser if the LLVM assembly does not contain data layout. If there is mismatch between alloca instruction and data layout, it will be caught by LLVM verifier.


https://reviews.llvm.org/D41832

Files:
  include/llvm/IR/AutoUpgrade.h
  include/llvm/IR/Verifier.h
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/IR/AutoUpgrade.cpp
  lib/IR/Verifier.cpp
  test/CodeGen/AMDGPU/fence-barrier.ll
  test/CodeGen/AMDGPU/sched-crash-dbg-value.mir
  tools/llc/llc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41832.128967.patch
Type: text/x-patch
Size: 17193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180108/e7758df7/attachment.bin>


More information about the llvm-commits mailing list