Duncan P. N. Exon Smith [Tue, 31 Mar 2015 00:10:37 +0000 (00:10 +0000)]
DebugInfo: Remove LexicalBlockFile scope/context distinction
Two things here:
1. I read `getScope()` and `getContext()` backwards in r233640. There
was no need for `getScopeOfScope()`. Obviously not enough test
coverage here (as I said in that commit, I'm going to come back to
that), but anyway I'm reverting to the behaviour before r233640.
2. The callers that use `DILexicalBlockFile::getContext()` don't seem
to care about the difference. Just have it redirect to `getScope()`
so I can't get confused again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233650
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 31 Mar 2015 00:10:04 +0000 (00:10 +0000)]
Replace the MCSubtargetInfo parameter with a Triple when creating
an MCInstPrinter. Update all callers and use where we wanted a Triple
previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233648
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 31 Mar 2015 00:03:43 +0000 (00:03 +0000)]
llvm/examples: Suppress building a few JIT examples.
examples/ExceptionDemo/CMakeFiles/ExceptionDemo.dir/ExceptionDemo.cpp.o:(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233647
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 31 Mar 2015 00:03:36 +0000 (00:03 +0000)]
llvm/examples: Add RuntimeDyld as libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233646
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 23:58:59 +0000 (23:58 +0000)]
LexicalScopes: Cleanup remaining uses of DebugLoc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233644
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 23:47:26 +0000 (23:47 +0000)]
DebugLoc: Remove getFromDILexicalBlock()
The only user of `DebugLoc::getFromDILexicalBlock()` was creating a new
`MDLocation` as convenient API for passing an `MDScope`. Stop doing
that, and remove the API. If in the future we actually *want* to create
new DebugLocs, calling `MDLexicalBlock::get()` makes more sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233643
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 23:21:21 +0000 (23:21 +0000)]
LexicalScopes: Use debug info hierarchy pervasively
Pervasively use the types provided by the debug info hierarchy rather
than `MDNode` in `LexicalScopes`.
I noticed (again, I guess, based on comments in the implementation?)
that `DILexicalBlockFile::getScope()` returns something different from
`DILexicalBlockFile::getContext()`. I created a local helper for
getting the same logic from `MDLexicalBlockFile` called
`getScopeOfScope()`. I still don't really understand it, but I've added
some FIXMEs and I'll come back to it (I suspect the way we encode these
objects isn't really ideal).
Note that my previous commit r233610 accidentally changed behaviour in
`findLexicalScope()` -- it transitioned from a call to
`DILexicalBlockFile::getScope()` to `MDLexicalBlockFile::getScope()`
(sounds right, doesn't it?) -- so I've fixed that as a drive-by. No
tests failed with my error, so it looks like we're missing some coverage
here... when I come back to understand the logic, I'll see if I can add
some.
Other than the fix to `findLexicalScope()`, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233640
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 30 Mar 2015 23:14:45 +0000 (23:14 +0000)]
Silence an unused variable warning.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233639
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Mar 2015 23:05:30 +0000 (23:05 +0000)]
Move lib/Fuzzer docs from a README.txt to a proper .rst file.
Summary:
Move lib/Fuzzer docs from a README.txt to a proper .rst file.
This change does not add any content, just formatting.
Test Plan: n/a
Reviewers: samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233638
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Mar 2015 23:04:35 +0000 (23:04 +0000)]
[fuzzer] when a single unit takes over 1 second to run and it is the slowest one so far, print it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233637
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 30 Mar 2015 22:58:10 +0000 (22:58 +0000)]
[WinEH] Run cleanup handlers when an exception is thrown
Generate tables in the .xdata section representing what actions to take
when an exception is thrown. This currently fills in state for
cleanups, catch handlers are still unfinished.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233636
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 30 Mar 2015 22:45:56 +0000 (22:45 +0000)]
Transfer implicit operands when expanding the RET_ReallyLR pseudo instruction.
When we expand the RET_ReallyLR pseudo instruction we also need to transfer the
implicit operands.
The return register is an implicit operand and without it the liveness
calculation generates an incorrect live-out set for the patchpoint.
This fixes rdar://problem/
19068476.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233635
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Mar 2015 22:44:03 +0000 (22:44 +0000)]
[fuzzer] print various stats in a unified way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233624
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Mon, 30 Mar 2015 22:40:40 +0000 (22:40 +0000)]
[bpf] add support for bswap instructions
BPF has cpu_to_be and cpu_to_le instructions.
For now assume little endian and generate cpu_to_be for ISD::BSWAP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233620
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Mon, 30 Mar 2015 22:40:35 +0000 (22:40 +0000)]
[bpf] fix build
fix build broken due to r233599.
Would still need to switch to MDLocation long term.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233619
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Mar 2015 22:31:14 +0000 (22:31 +0000)]
Rename const char *Triple argument to TT to avoid shadowing llvm::Triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233615
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Mar 2015 22:16:37 +0000 (22:16 +0000)]
Remove unused MCSubtargetInfo argument from the X86 MCInstPrinter ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233614
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Mar 2015 22:09:51 +0000 (22:09 +0000)]
DFSan-based fuzzer (proof of concept).
Summary:
This adds a simple DFSan-based (i.e. taint-guided) fuzzer mutator,
see the comments for details.
Test Plan: a test added
Reviewers: samsonov, pcc
Reviewed By: samsonov, pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233613
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Mar 2015 22:09:43 +0000 (22:09 +0000)]
Remove unused MCSubtargetInfo argument from the Sparc MCInstPrinter ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233612
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Mar 2015 22:03:16 +0000 (22:03 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 21:54:46 +0000 (21:54 +0000)]
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
Eric Christopher [Mon, 30 Mar 2015 21:52:28 +0000 (21:52 +0000)]
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
Eric Christopher [Mon, 30 Mar 2015 21:52:26 +0000 (21:52 +0000)]
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
Eric Christopher [Mon, 30 Mar 2015 21:52:21 +0000 (21:52 +0000)]
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
Quentin Colombet [Mon, 30 Mar 2015 21:50:44 +0000 (21:50 +0000)]
[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
David Blaikie [Mon, 30 Mar 2015 21:41:43 +0000 (21:41 +0000)]
[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
Rafael Espindola [Mon, 30 Mar 2015 21:36:43 +0000 (21:36 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 21:35:14 +0000 (21:35 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 21:32:28 +0000 (21:32 +0000)]
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
Paul Robinson [Mon, 30 Mar 2015 21:27:28 +0000 (21:27 +0000)]
Explain how to abandon a review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233600
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 21:19:50 +0000 (21:19 +0000)]
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
Rafael Espindola [Mon, 30 Mar 2015 21:18:36 +0000 (21:18 +0000)]
Use range loops and add missing braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233598
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 21:05:29 +0000 (21:05 +0000)]
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
David Blaikie [Mon, 30 Mar 2015 20:42:56 +0000 (20:42 +0000)]
[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
Peter Collingbourne [Mon, 30 Mar 2015 20:41:21 +0000 (20:41 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 20:04:06 +0000 (20:04 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 19:49:49 +0000 (19:49 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 19:40:05 +0000 (19:40 +0000)]
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
Paul Robinson [Mon, 30 Mar 2015 19:37:44 +0000 (19:37 +0000)]
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
Justin Holewinski [Mon, 30 Mar 2015 19:30:55 +0000 (19:30 +0000)]
[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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 19:14:47 +0000 (19:14 +0000)]
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
Kit Barton [Mon, 30 Mar 2015 18:46:15 +0000 (18:46 +0000)]
[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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 18:45:11 +0000 (18:45 +0000)]
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
Lang Hames [Mon, 30 Mar 2015 18:37:01 +0000 (18:37 +0000)]
[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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 18:29:18 +0000 (18:29 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 18:23:28 +0000 (18:23 +0000)]
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
Justin Holewinski [Mon, 30 Mar 2015 18:12:50 +0000 (18:12 +0000)]
[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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 18:07:40 +0000 (18:07 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 17:41:24 +0000 (17:41 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 17:21:38 +0000 (17:21 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 17:06:38 +0000 (17:06 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 17:04:06 +0000 (17:04 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 16:37:48 +0000 (16:37 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 16:21:28 +0000 (16:21 +0000)]
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
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 16:19:15 +0000 (16:19 +0000)]
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
Yaron Keren [Mon, 30 Mar 2015 16:10:39 +0000 (16:10 +0000)]
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
Yaron Keren [Mon, 30 Mar 2015 15:42:36 +0000 (15:42 +0000)]
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
Sanjay Patel [Mon, 30 Mar 2015 15:31:32 +0000 (15:31 +0000)]
more space; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233554
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 30 Mar 2015 15:25:51 +0000 (15:25 +0000)]
[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
Rafael Espindola [Mon, 30 Mar 2015 15:16:30 +0000 (15:16 +0000)]
Fix Sphinx warning " Title underline too short.".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233551
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 30 Mar 2015 13:59:06 +0000 (13:59 +0000)]
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
Ulrich Weigand [Mon, 30 Mar 2015 13:46:59 +0000 (13:46 +0000)]
[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
Ulrich Weigand [Mon, 30 Mar 2015 13:46:25 +0000 (13:46 +0000)]
[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
Rafael Espindola [Mon, 30 Mar 2015 13:39:16 +0000 (13:39 +0000)]
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
Daniel Sanders [Mon, 30 Mar 2015 13:27:25 +0000 (13:27 +0000)]
[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
Russell Gallop [Mon, 30 Mar 2015 12:39:03 +0000 (12:39 +0000)]
Revert test commit at revision 233535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233536
91177308-0d34-0410-b5e6-
96231b3b80d8
Russell Gallop [Mon, 30 Mar 2015 12:37:55 +0000 (12:37 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233535
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 30 Mar 2015 09:30:02 +0000 (09:30 +0000)]
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
Elena Demikhovsky [Mon, 30 Mar 2015 09:29:28 +0000 (09:29 +0000)]
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
Elena Demikhovsky [Mon, 30 Mar 2015 08:30:34 +0000 (08:30 +0000)]
AVX-512: added intrinsics for VPAND, VPOR and VPXOR
by Asaf Badouh (asaf.badouh@intel.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233525
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Mar 2015 06:31:14 +0000 (06:31 +0000)]
[X86] In getHostCPUFeatures, disable xop, f16c, fma, and fma4 if OS does not support saving ymm state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233518
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Mar 2015 06:31:11 +0000 (06:31 +0000)]
[X86] Remove FeatureAES for 'corei7' CPU. 'corei7' should match 'nehalem' which doesn't have AES. Having AES and not PCLMUL makes 'corei7' halfway between Nehalem and Westmere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233517
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Mar 2015 06:31:09 +0000 (06:31 +0000)]
[X86] Use the more specific CPU names like 'nehalem', 'westmere', 'haswell', etc. Split Nehalem and Westmere CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233516
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Mar 2015 06:31:06 +0000 (06:31 +0000)]
[X86] Move family 6 model 21 to 'pentium-m'. Near as I can tell this is a Dothan based SOC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233515
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Mar 2015 06:31:03 +0000 (06:31 +0000)]
[X86] Family 6 model 29 is a Penryn based processor not a Nehalem based processor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233514
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Mon, 30 Mar 2015 05:15:57 +0000 (05:15 +0000)]
[MCJIT] In debug memory dump output, don't truncate 64 bit addresses
Summary: In dumpMemorySections a cast was too short, and in resolveRelocations a format string was too short.
Test Plan:
Enable debug build and run a program which invokes MCJIT::finalizeObject(). Saw valid input as below (highlighted addresses were previously truncated):
```
Parse relocations:
Resolving relocations Section #0 **0x7f4c1337b000**
----- Contents of section socket1 before relocations -----
**0x00007f4c1337b000**: 18 01 00 00 01 01 01 0a 00 00 00 00 04 03 02 01
0x00007f4c1337b010: 7b 1a f8 ff 00 00 00 00 18 11 00 00 05 00 00 00
```
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits, ast
Differential Revision: http://reviews.llvm.org/D8681
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233512
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 30 Mar 2015 04:02:55 +0000 (04:02 +0000)]
[Orc] Add missing #include. Hopefully this will appease the modules buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233510
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 30 Mar 2015 03:37:06 +0000 (03:37 +0000)]
[MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo through
MCJIT.
This patch decouples the two responsibilities of the RTDyldMemoryManager class,
memory management and symbol resolution, into two new classes:
RuntimeDyld::MemoryManager and RuntimeDyld::SymbolResolver.
The symbol resolution interface is modified slightly, from:
uint64_t getSymbolAddress(const std::string &Name);
to:
RuntimeDyld::SymbolInfo findSymbol(const std::string &Name);
The latter passes symbol flags along with symbol addresses, allowing RuntimeDyld
and others to reason about non-strong/non-exported symbols.
The memory management interface removes the following method:
void notifyObjectLoaded(ExecutionEngine *EE,
const object::ObjectFile &) {}
as it is not related to memory management. (Note: Backwards compatibility *is*
maintained for this method in MCJIT and OrcMCJITReplacement, see below).
The RTDyldMemoryManager class remains in-tree for backwards compatibility.
It inherits directly from RuntimeDyld::SymbolResolver, and indirectly from
RuntimeDyld::MemoryManager via the new MCJITMemoryManager class, which
just subclasses RuntimeDyld::MemoryManager and reintroduces the
notifyObjectLoaded method for backwards compatibility).
The EngineBuilder class retains the existing method:
EngineBuilder&
setMCJITMemoryManager(std::unique_ptr<RTDyldMemoryManager> mcjmm);
and includes two new methods:
EngineBuilder&
setMemoryManager(std::unique_ptr<MCJITMemoryManager> MM);
EngineBuilder&
setSymbolResolver(std::unique_ptr<RuntimeDyld::SymbolResolver> SR);
Clients should use EITHER:
A single call to setMCJITMemoryManager with an RTDyldMemoryManager.
OR (exclusive)
One call each to each of setMemoryManager and setSymbolResolver.
This patch should be fully compatible with existing uses of RTDyldMemoryManager.
If it is not it should be considered a bug, and the patch either fixed or
reverted.
If clients find the new API to be an improvement the goal will be to deprecate
and eventually remove the RTDyldMemoryManager class in favor of the new classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233509
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 29 Mar 2015 22:07:07 +0000 (22:07 +0000)]
[Orc] Add missing inline keyword to the function introduced in r233504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233506
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 29 Mar 2015 21:55:27 +0000 (21:55 +0000)]
[Orc] Use raw TargetAddresses for callback trampoline addresses, rather than IR.
Add convenience function for building a typed IR Constant from trampoline
addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233504
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Mar 2015 20:49:03 +0000 (20:49 +0000)]
Silence sign compare warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233502
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Mar 2015 20:33:07 +0000 (20:33 +0000)]
[inline asm] Don't reject duplicated matching constraints
They're harmless and it's easy to generate them from clang, leading to
a crash in LLVM. Found by afl-fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233500
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 29 Mar 2015 19:13:40 +0000 (19:13 +0000)]
Use SDValue bool check to tidyup some possible vector folding ops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233498
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 29 Mar 2015 16:49:51 +0000 (16:49 +0000)]
Use SDValue bool check to tidyup some possible ReassociateOps. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233495
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 29 Mar 2015 09:14:29 +0000 (09:14 +0000)]
AVX-512: Fixed the "commutative" property flag in VPANDN instruction
By Asaf Badouh (asaf.badouh@intel.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233489
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 29 Mar 2015 01:07:57 +0000 (01:07 +0000)]
Fix a variable name in MSVC specific part of rr233487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233488
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 29 Mar 2015 01:00:23 +0000 (01:00 +0000)]
[X86] Implement getHostCPUFeatures for X86.
Plan to use this as part of CPU 'native' support so we can stop picking a different CPU name if CPU doesn't support AVX or AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233487
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 21:07:24 +0000 (21:07 +0000)]
Delete MCInstPrinter::AvailableFeatures.
All the ports have been fixed to read the feature bits from the subtarget passed
to the print methods. Also, delete the call to setAvailableFeatures in the
constructor of NVPTX's instprinter as the instprinter wasn't using the feature
bits anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233486
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 20:56:05 +0000 (20:56 +0000)]
[X86] Read the feature bits from the subtarget that is passed to printInst
instead of from MCInstPrinter::AvailableFeatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233485
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 20:44:05 +0000 (20:44 +0000)]
[Objdump] Pass the correct subtarget to printInst.
This fixes a bug I introduced in r233411.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233484
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 28 Mar 2015 19:42:41 +0000 (19:42 +0000)]
[PowerPC] Add asm parser support for bitmask forms of rotate-and-mask instructions
The asm syntax for the 32-bit rotate-and-mask instructions can take a 32-bit
bitmask instead of an (mb, me) pair. This syntax is not specified in the Power
ISA manual, but is accepted by GNU as, and is documented in IBM's Assembler
Language Reference. The GNU Multiple Precision Arithmetic Library (gmp)
contains assembly that uses this syntax.
To implement this, I moved the isRunOfOnes utility function from
PPCISelDAGToDAG.cpp to PPCMCTargetDesc.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233483
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 28 Mar 2015 18:31:31 +0000 (18:31 +0000)]
[DAGCombiner] Fixed incorrect test for buildvector of constant integers.
DAGCombiner::ReassociateOps was correctly testing for an constant integer scalar but failed to correctly test for constant integer vectors (it was testing for any constant vector).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233482
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 28 Mar 2015 16:44:57 +0000 (16:44 +0000)]
[ConstantFold] Don't fold ppc_fp128 <-> int bitcasts
PPC_FP128 is really the sum of two consecutive doubles, where the first double
is always stored first in memory, regardless of the target endianness. The
memory layout of i128, however, depends on the target endianness, and so we
can't fold this without target endianness information. As a result, we must not
do this folding in lib/IR/ConstantFold.cpp (it could be done instead in
Analysis/ConstantFolding.cpp, but that's not done now).
Fixes PR23026.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233481
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Mar 2015 04:59:14 +0000 (04:59 +0000)]
Convert feature strings to lowercase even if they have a '+'/'-' in front of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233475
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 04:40:43 +0000 (04:40 +0000)]
Partially revert the changes I made in r233473 to keep the code concise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233474
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 04:25:41 +0000 (04:25 +0000)]
clang-format X86ATTInstPrinter.{h,cpp} before I make changes to these files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233473
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 28 Mar 2015 04:03:51 +0000 (04:03 +0000)]
[SparcInstPrinter] Use the subtarget that is passed to the print function
instead of the one passed to the constructor.
Unfortunately, I don't have a test case for this change. In order to test my
change, I will have to run the code after line 90 in printSparcAliasInstr. I
couldn't make that happen because printAliasInstr would always handle the
printing of fcmp instructions that the code after line 90 is supposed to handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233471
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Mar 2015 03:24:19 +0000 (03:24 +0000)]
Update comment to match code behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233470
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 28 Mar 2015 02:43:53 +0000 (02:43 +0000)]
Verifier: Allow subroutine types to have no type array
Loosen one check from r233446: as long as `DIBuilder` requires a
non-null type for every subprogram, we should allow a null type array.
Also add tests for the rest of `MDSubroutineType`, which were somehow
missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233468
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Sat, 28 Mar 2015 02:37:33 +0000 (02:37 +0000)]
Fix comparison functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233467
91177308-0d34-0410-b5e6-
96231b3b80d8