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

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 11:16:39 PDT 2016


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20121.56764.patch
Type: text/x-patch
Size: 29165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160510/097f4b0d/attachment-0001.bin>


More information about the llvm-commits mailing list