[PATCH] D20121: Make "@name =" mandatory for globals in .ll files

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 11:21:37 PDT 2016


Yeah, that doesn’t seem to be particularly useful.  The small number of tests you had to update shows just how few people probably even knew it existed.

LGTM to remove it.

Cheers,
Pete
> On May 10, 2016, at 11:16 AM, Rafael Ávila de Espíndola via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> rafael created this revision.
> rafael added a reviewer: dexonsmith.
> rafael added a subscriber: llvm-commits.
> Herald added a subscriber: qcolombet.
> 
> An oddity of the .ll syntax is that the "@var = " in 
> 
> ```
> @var = global i32 42
> ```
> 
> is optional. Writing just
> ```
> global i32 42
> ```
> 
> is equivalent to
> 
> ```
> @0 = global i32 42
> ```
> 
> This means that there is a pretty big First set at the top level. The current implementation maintains it manually. I was trying to refactor it, but then started wondering why keep it a all. I personally find the above syntax confusing. It looks like something is missing.
> 
> The attached patch removes the feature and simplifies the parser.
> 
> http://reviews.llvm.org/D20121
> 
> Files:
>  docs/LangRef.rst
>  lib/AsmParser/LLParser.cpp
>  test/Assembler/2003-04-15-ConstantInitAssertion.ll
>  test/Assembler/2003-05-21-ConstantShiftExpr.ll
>  test/Assembler/2003-05-21-MalformedShiftCrash.ll
>  test/Assembler/2003-05-21-MalformedStructCrash.ll
>  test/Assembler/2003-08-21-ConstantExprCast-Fold.ll
>  test/Assembler/2004-01-20-MaxLongLong.ll
>  test/Assembler/2004-02-01-NegativeZero.ll
>  test/Assembler/2009-02-01-UnnamedForwardRef.ll
>  test/Assembler/ConstantExprFold.ll
>  test/Assembler/getelementptr_vec_idx4.ll
>  test/Assembler/invalid-hexint.ll
>  test/Assembler/invalid_cast4.ll
>  test/Assembler/vector-cmp.ll
>  test/CodeGen/PowerPC/2008-03-24-CoalescerBug.ll
>  test/CodeGen/X86/2008-07-19-movups-spills.ll
>  test/CodeGen/X86/2008-07-22-CombinerCrash.ll
>  test/CodeGen/X86/2008-09-29-ReMatBug.ll
>  test/CodeGen/X86/2009-03-05-burr-list-crash.ll
>  test/CodeGen/X86/extractps.ll
>  test/CodeGen/X86/pr2585.ll
>  test/Feature/constexpr.ll
>  test/Feature/constpointer.ll
>  test/Feature/globalvars.ll
>  test/Feature/testconstants.ll
>  test/Integer/constexpr_bt.ll
>  test/Integer/constpointer_bt.ll
>  test/Linker/2003-08-28-TypeResolvesGlobal3.ll
>  test/Transforms/GlobalOpt/2007-05-13-Crash.ll
>  test/Transforms/GlobalOpt/2009-03-06-Anonymous.ll
> 
> <D20121.56764.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list