[PATCH] D44848: Align stubs for external and common global variables to pointer size.

Rahul Chaudhry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 16:17:28 PDT 2018


rahulchaudhry added inline comments.


================
Comment at: test/Object/X86/align-stub.ll:12
+
+$_ZTS3bar = comdat any
+
----------------
espindola wrote:
> rahulchaudhry wrote:
> > espindola wrote:
> > > Code change LGTM, but can't you trim the test a bit? For example, why do you need two comdats to test a change on the exception table output?
> > > 
> > The test file was generated by running "clang++ -fPIE -emit-llvm -S " on the testcase in PR36885.
> > I removed a few lines of header and footer as it didn't matter.
> > I don't know llvm well enough to be comfortable editing this file by hand, or to write one from scratch.
> > 
> > Frankly, it's not the greatest idea that we're adding compiler generated output as tests, instead of the original source which is far more compact and readable.
> > 
> The fix is to reduce the .ll file :-)
> 
> Simply remove everything you can as long the new file still shows the results you want.
> 
> You can check https://llvm.org/docs/LangRef.html if you have any questions.
> 
> You should also use named temporaries. You can do that by passing the .ll to "opt -instnamer". This will give you a testcase that is much simpler to reduce.
> 
Probably not what you expected, but I've minimized the testcase aggressively :)


Repository:
  rL LLVM

https://reviews.llvm.org/D44848





More information about the llvm-commits mailing list