Commit Graph

115614 Commits

Author SHA1 Message Date
Eric Christopher
c94e8e8a81 Remove unused MCSubtargetInfo argument from the NVPTX MCInstPrinter ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233611 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 22:03:16 +00:00
Duncan P. N. Exon Smith
35ff67e333 LexicalScopes: Use MDLocation directly instead of DebugLoc
There's no benefit to using `DebugLoc` here.  Moreover, this will let a
follow-up commit work with `MDScope` directly instead of `DebugLoc`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:54:46 +00:00
Eric Christopher
87b7793cdc Remove unused MCSubtargetInfo argument from the ARM MCInstPrinter ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233609 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:52:28 +00:00
Eric Christopher
cdd8ee38ea Remove unused MCSubtargetInfo argument from the AArch64 MCInstPrinter ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233608 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:52:26 +00:00
Eric Christopher
1c60a4e36b Remove unused Target argument from MCInstPrinter ctor functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233607 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:52:21 +00:00
Quentin Colombet
affc406350 [RegisterCoalescer] Fix a potential misuse of direct operand index in the
terminal rule.
Spot by code inspection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233606 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:50:44 +00:00
David Blaikie
25e3d2d6d3 [opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee type
This pushes the use of PointerType::getElementType up into several
callers - I'll essentially just have to keep pushing that up the stack
until I can eliminate every call to it...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233604 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:41:43 +00:00
Rafael Espindola
a55ae077e4 Fix PR23045.
Keep a note in the materializer that we are stripping debug info so that
user doing a lazy read of the module don't hit outdated formats.

Thanks to Duncan for suggesting the fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233603 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:36:43 +00:00
Duncan P. N. Exon Smith
7f3757eb9b Transforms: Update unit tests to use verifyModule()
Since I'm slowly gutting `DISubprogram` and `DICompileUnit`, update the
`CloneFunc` unit tests to call `verifyModule()` (where the checks are
moving to).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:35:14 +00:00
Duncan P. N. Exon Smith
494ae8db19 DwarfDebug: Avoid creating new DebugLocs in the backend
Don't use `DebugLoc::getFnDebugLoc()`, which creates new `MDLocation`s,
in the backend.  We just want to grab the subprogram here anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233601 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:32:28 +00:00
Paul Robinson
769b935ebc Explain how to abandon a review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233600 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:27:28 +00:00
Duncan P. N. Exon Smith
6d42c0084e DebugInfo: Remove dead code from old DebugLoc API
Remove old API for `DebugLoc` now that all the callers have been
updated.  If this broke your out-of-tree build, here's a quick map from
the old API to the new one:

    DebugLoc DebugLoc::getFromMDLocation(MDNode *)
      => DebugLoc::DebugLoc(MDLocation *)
      => explicit DebugLoc::DebugLoc(MDNode *) // works with broken code

    MDNode *DebugLoc::getAsMDNode(LLVMContext &)
      => MDLocation *DebugLoc::get()
      => DebugLoc::operator MDLocation *()
      => MDNode *DebugLoc::getAsMDNode() // works with broken code

    bool DebugLoc::isUnknown()
      => DebugLoc::operator MDLocation *()
          i.e.: if (MDLocation *DL = ...)
      => DebugLoc::operator bool() // works with broken code
          i.e.: if (DebugLoc DL = ...)

    void DebugLoc::getScopeAndInlinedAt(MDNode *&, MDNode *&)
      => use: MDNode *DebugLoc::getScope()
         and: MDLocation *DebugLoc::getInlinedAt()

    MDNode *DebugLoc::getScopeNode(LLVMContext &)
      => MDNode *DebugLoc::getInlinedAtScope()

    void DebugLoc::dump(LLVMContext &)
      => void DebugLoc::dump()

    void DebugLoc::getFnDebugLoc(LLVMContext &)
      => void DebugLoc::getFnDebugLoc()

    MDNode *DebugLoc::getScope(LLVMContext &)
      => MDNode *DebugLoc::getScope()

    MDNode *DebugLoc::getInlinedAt(LLVMContext &)
      => MDLocation *DebugLoc::getInlinedAt()

I've noted above the only functions that won't crash on broken code (due
to downcasting to `MDLocation`).  If your code could be dealing with
broken IR (i.e., you haven't run the verifier yet, or you've used a
temporary node that will eventually (but not yet) get RAUW'ed to an
`MDLocation`), you need to restrict yourself to those.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233599 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:19:50 +00:00
Rafael Espindola
37780d81b1 Use range loops and add missing braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:18:36 +00:00
Duncan P. N. Exon Smith
454c320c6e Transforms: Fix a use of the old DebugLoc in unittests
Missed this one before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233597 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 21:05:29 +00:00
David Blaikie
f9ed6b05a5 [opaque pointer type] More IRBuilder::createGEP (non-inbounds) migrations: CodeGenPrepare and SimplifyLibCalls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233596 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 20:42:56 +00:00
Peter Collingbourne
07ee8d2fc1 MC: For variable symbols, maintain MCSymbol::Section as a cache.
This fixes the visibility of symbols in certain edge cases involving aliases
with multiple levels of indirection.

Fixes PR19582.

Differential Revision: http://reviews.llvm.org/D8586

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233595 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 20:41:21 +00:00
Duncan P. N. Exon Smith
68338f833e llvm-dis: Use the new DebugLoc API, NFC
Update tools/llvm-dis to use the new `DebugLoc` API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233590 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 20:04:06 +00:00
Duncan P. N. Exon Smith
f175439a2b Transforms: Use the new DebugLoc API, NFC
Update lib/Analysis and lib/Transforms to use the new `DebugLoc` API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233587 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 19:49:49 +00:00
Duncan P. N. Exon Smith
39acf8f243 IR: Use the new DebugLoc API, NFC
Update lib/IR and lib/Bitcode to use the new `DebugLoc` API.  Added an
explicit conversion to `bool` (avoiding a conversion to `MDLocation`),
since a couple of these use cases need to handle broken code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233585 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 19:40:05 +00:00
Paul Robinson
103d622517 Verify 'optnone' can run DAG combiner when appropriate.
Adds a test to verify the behavior that r233153 restored: 'optnone'
does not spuriously disable the DAG combiner, and in fact there are
cases where the DAG combiner must run (even at -O0 or 'optnone') in
order for codegen to succeed.

Differential Revision: http://reviews.llvm.org/D8614


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233584 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 19:37:44 +00:00
Justin Holewinski
e6d6461067 [NVPTX] Associate a minimum PTX version for each SM architecture
When a new SM architecture is introduced, it is only supported by the
current PTX version and later.  Make sure we are using at least the
minimum PTX version for the target architecture.

This also removes support for PTX ISA < 3.2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 19:30:55 +00:00
Duncan P. N. Exon Smith
3637babc4c CodeGen: Use the new DebugLoc API, NFC
Update lib/CodeGen (and lib/Target) to use the new `DebugLoc` API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 19:14:47 +00:00
Kit Barton
9039fc77c3 [PPC] Modify HTM and crypto intrinsics to inherit from GCCBuiltin
There was a change to the way some of the HTM and crypto builtins are being
handled in Clang. Previously, some of the builtins were dealt with in the
CodeGenFunction::EmitPPCBuiltinExpr method (in order to do range checking on
constant arguments). These check will been moved to Sema
http://reviews.llvm.org/D8672), which means those builtins will not be handled
in the EmitPPCBuiltinExpr method anymore. As a result, the definition of the
intrinsics in IntrinsicsPowerPC.td needs to be modified to inherit from the
GCCBuiltin definition.

http://reviews.llvm.org/D8673


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:46:15 +00:00
Duncan P. N. Exon Smith
770661092f DebugInfo: Reflow printDebugLoc() to use early returns, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233580 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:45:11 +00:00
Lang Hames
70c2586498 [Orc] Separate callback manager selection from callback manager construction for
OrcLazyJIT in lli.

Separating these concerns enables more natural error handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233579 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:37:01 +00:00
Duncan P. N. Exon Smith
d0db611445 Bitcode: Reflow code to use early continues, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233578 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:29:18 +00:00
Duncan P. N. Exon Smith
5ae5e64f9f SelectionDAG: Reflow code to use early returns, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233577 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:23:28 +00:00
Justin Holewinski
d85053fc3f [NVPTX] Add options for PTX 4.1/4.2 and SM 3.2/3.7/5.2/5.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233575 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:12:50 +00:00
Duncan P. N. Exon Smith
1c13197c9f DebugInfo: Write new DebugLoc API
Rewrite `DebugLoc` with a cleaner API that reflects its current status
as a wrapper around an `MDLocation` pointer.

  - Add accessors/constructors to/from `MDLocation`.
  - Simplify construction from `MDNode`.
  - Remove unnecessary `LLVMContext` from APIs.
  - Drop some API that isn't useful any more.
  - Rewrite documentation.

Actually, I've left the old API behind temporarily at the bottom of the
class so that I can update callers in separate commits.  I'll remove it
once the callers are updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233573 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 18:07:40 +00:00
Duncan P. N. Exon Smith
3584797a17 DebugInfo: Implement MDLocation::getInlinedAtScope()
Write `MDLocation::getInlinedAtScope()` and use it to re-implement
`DebugLoc::getScopeNode()` (and simplify `DISubprogram::Verify()`).
This follows the inlined-at linked list and returns the scope of the
deepest/last location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233568 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 17:41:24 +00:00
Duncan P. N. Exon Smith
7380257f0e Verifier: Add operand checks for remaining debug info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233565 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 17:21:38 +00:00
Duncan P. N. Exon Smith
d9720a4749 DebugInfo: Simplify logic in DISubprogram::Verify(), NFC
Simplify the logic in `DISubprogram::Verify()` by using the new debug
info hierarchy directly instead of the `DebugLoc` wrapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233563 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 17:06:38 +00:00
Duncan P. N. Exon Smith
a3dbc680a7 Verifier: Loosen r233559 check for 'function:' field in MDSubprogram
Stop worrying about what the `function:` field is in `MDSubprogram`,
since it could be a bitcast [1].  Just check its type and leave it at
that.

[1]: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/3540/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233562 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 17:04:06 +00:00
Duncan P. N. Exon Smith
d3ec0ca17e Verifier: Add operand checks for MDLexicalBlock
Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`.  Like
`MDLocalVariable` and `MDLocation`, these nodes always require a scope.

There was no test bitrot to fix here (just updated the serialization
tests in test/Assembler/mdlexicalblock.ll).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:37:48 +00:00
Duncan P. N. Exon Smith
0c251f74ef DebugInfo: Rename some testcases
Momentarily (but never in tree), the `scope:` field was called
`parent:`.  Apparently a few testcases were left behind with "parent" in
the name, so rename them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233560 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:21:28 +00:00
Duncan P. N. Exon Smith
bd38c8d788 Verifier: Check operands of MDSubprogram nodes
Check operands of `MDSubprogram`s in the verifier, and update the
accessors and factory functions to use more specific types.

There were a lot of broken testcases, which I fixed in r233466.  If you
have out-of-tree tests for debug info, you probably need similar changes
to the ones I made there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233559 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:19:15 +00:00
Yaron Keren
f88cbb8c49 Trying to fix the Hexagon and debian-fast bots arm32_neon_vcnt_upgrade.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233558 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:10:39 +00:00
Yaron Keren
6e92e7b09a Remove more superfluous .str() and replace std::string concatenation with Twine.
Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 15:42:36 +00:00
Sanjay Patel
65e878bd80 more space; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 15:31:32 +00:00
Simon Pilgrim
d8f2918479 [X86] Ensure integer domain on scalar i64 load/store stack folding tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233553 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 15:25:51 +00:00
Rafael Espindola
94755c9c94 Fix Sphinx warning " Title underline too short.".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 15:16:30 +00:00
Rafael Espindola
fd45ac4635 Save a std::string.
The group names are always symbol names, so we can use a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:59:06 +00:00
Ulrich Weigand
5738b77176 [SystemZ] Fix LLVM crash on unoptimized code
Compiling the following function with -O0 would crash, since LLVM would
hit an assertion in getTestUnderMaskCond:

  int test(unsigned long x)
  {
    return x >= 0 && x <= 15;
  }

Fixed by detecting the case in the caller of getTestUnderMaskCond.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233541 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:46:59 +00:00
Ulrich Weigand
b42e01326d [SystemZ] Remove TargetMachine CPU auto-detection
As was done for X86 in r206094.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233540 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:46:25 +00:00
Rafael Espindola
0bd11cd898 Special case the creation of relocation sections.
These sections are never looked up and we know when have to create them. Use
that to save adding them to the regular map and avoid a symbol->string->symbol
conversion for the group symbol.

This also makes the implementation independent of the details of how unique
sections are implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:39:16 +00:00
Daniel Sanders
35efeb5e16 [mips] Support 9-bit offsets for the 'R' inline assembly memory constraint.
Summary:
The 'R' constraint is actually supposed to be much more complicated than
this and is defined in terms of whether it will cause macro expansion in
the assembler. 'R' is getting less useful due to architecture changes and
ought to be replaced by other constraints. We therefore implement 9-bit
offsets which will work for all subtargets and all instructions.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8440


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233537 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:27:25 +00:00
Russell Gallop
4f2bfb4d48 Revert test commit at revision 233535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233536 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 12:39:03 +00:00
Russell Gallop
07487fe861 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233535 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 12:37:55 +00:00
Daniel Jasper
a4b389c125 Revert "[SCEV] Look at backedge dominating conditions."
This leads to terribly slow compile times under MSAN. More discussion
on the commit thread of r233447.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 09:30:02 +00:00
Elena Demikhovsky
10e73aeede AVX-512: blank lines, duplicated tests, no functional changes
see comments http://reviews.llvm.org/D6835


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 09:29:28 +00:00