Commit Graph

120637 Commits

Author SHA1 Message Date
NAKAMURA Takumi
34620e340b Tweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 08:38:22 +00:00
NAKAMURA Takumi
52cfa5e534 ShrinkWrap.cpp: Tweak r244235 for a non-functional member, PredicateFtor. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 07:40:23 +00:00
JF Bastien
6d2f2ee4ab WebAssembly: textual emission uses expected opcode names
Summary: WebAssembly's tablegen instructions have the names WebAssembly expects, but by LLVM convention they're uppercase and suffixed with their type after an underscore. Leave the C++ code that way, but print outt he names WebAssembly expects (lowercase, no type). We could teach tablegen to do this later, maybe by using `!cast<string>(node)` in the .td files.

Reviewers: sunfish

Subscribers: jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244305 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 01:57:03 +00:00
Tom Stellard
9baa291a86 ELF: Add AMDGPU specific defintions
Reviewers: rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 01:35:24 +00:00
Duncan P. N. Exon Smith
d2914e38f0 ValueMapper: Resolve uniquing cycles more aggressively
As a follow-up to r244181, resolve uniquing cycles underneath distinct
nodes on the fly.  This prevents uniquing cycles in early operands from
affecting later operands.  It also removes an iteration through distinct
nodes' operands.

No real functional change here, just more prompt resolution of temporary
nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244302 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 00:44:55 +00:00
Duncan P. N. Exon Smith
db5b592a6e ValueMapper: Pull out helper to resolve cycles, NFC
Pull out a helper for resolving uniquing cycles of `Metadata` to remove
the boiler-plate of downcasting to `MDNode`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244301 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 00:39:26 +00:00
Davide Italiano
e06606ffd1 [llvm-readobj] Convert to range-loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-07 00:35:28 +00:00
Alex Lorenz
b12f9b3954 MIR Serialization: Fix serialization of unnamed IR block references.
The block address machine operands can reference IR blocks in other functions.
This commit fixes a bug where the references to unnamed IR blocks in other
functions weren't serialized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 23:57:04 +00:00
Alex Lorenz
263d80f920 MIR Parser: Simplify the token's string value handling.
This commit removes the 'StringOffset' and 'HasStringValue' fields from the
MIToken struct and simplifies the 'stringValue' method which now returns
the new 'StringValue' field.

This commit also adopts a different way of initializing the lexed tokens -
instead of constructing a new MIToken instance, the lexer resets the old token
using the new 'reset' method and sets its attributes using the new
'setStringValue', 'setOwnedStringValue', and 'setIntegerValue' methods.

Reviewers: Sean Silva

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244295 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 23:17:42 +00:00
Sean Silva
7515d33b6c [LangRef] Cleanup some stray whitespace inconsistencies.
Patch by Debora Setton Sanches! <setton.debora@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244294 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:56:48 +00:00
Sean Silva
1709c2bf16 [LangRef] Tiny editorial fixes.
Patch by Debora Setton Sanches! <setton.debora@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244293 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:56:24 +00:00
Alex Lorenz
32dcc28f85 Add initial documentation for the MIR serialization format.
Differential Revision: http://reviews.llvm.org/D11736


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244292 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:55:19 +00:00
Juergen Ributzka
138cd6dae8 [AArch64][FastISel] Always use AND before checking the branch flag.
When we are not emitting the condition for the branch, because the condition is
in another BB or SDAG did the selection for us, then we have to mask the flag in
the register with AND.

This is required when the condition comes from a truncate, because SDAG only
truncates down to a legal size of i32.

This fixes rdar://problem/22161062.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:44:15 +00:00
Juergen Ributzka
6f653ee44c Revert "[AArch64][FastISel] Add more truncation tests." and "[AArch64][FastISel] Always use an AND instruction when truncating to non-legal types."
This reverts commit r243198 and 243304.

Turns out this wasn't the correct fix for this problem. It works only within
FastISel, but fails when the truncate is selected by SDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244287 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:13:48 +00:00
Sean Silva
3153f23b24 [compatibility.ll] Cover explicitly named comdats.
Patch by Vedant Kumar! <vsk@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244284 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:04:21 +00:00
Sean Silva
c169fa6f10 Describe the process better.
Patch by Vedant Kumar! <vsk@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244283 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 22:03:54 +00:00
Rafael Espindola
8a0ff180e8 Move to llvm-readobj code that is only used there.
lld might end up using a small part of this, but it will be in a much
refactored form. For now this unblocks avoiding the full section scan in the
ELFFile constructor.

This also has a (very small) error handling improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244282 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:54:37 +00:00
David Majnemer
ecc0eab4a8 Revert accidentally committed WinEHPrepare changes
This reverts commit r244272, r244273, r244274, and r244275.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244278 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:13:51 +00:00
David Majnemer
5931147ea2 [IR] Remove TerminateInst's "NameStr" argument
TerminateInst can't have a name because it doesn't produce a result.  No
functionality change is intended, this is just a cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:08:36 +00:00
David Majnemer
a94c4c0c2b PHIs don't need to be postprocessed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:08:34 +00:00
David Majnemer
d284a380ab Handle PHI nodes prefacing EH pads too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:08:32 +00:00
David Majnemer
70200146b4 handle phi nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244273 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:08:30 +00:00
David Majnemer
cb675bb03a [WinEHPrepare] Add rudimentary support for the new EH instructions
Summary:
This adds somewhat basic preparation functionality including:
- Formation of funclets via coloring basic blocks.
- Cloning of polychromatic blocks to ensure that funclets have unique
  program counters.
- Demotion of values used between different funclets.
- Some amount of cleanup once we have removed predecessors from basic
  blocks.
- Verification that we are left with a CFG that makes some amount of
  sense.

N.B. Arguments and numbering still need to be done.

Reviewers: rnk, JosephTremoulet

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244272 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:07:55 +00:00
Frederic Riss
af511be69a [dsymutil] Implement dSYM bundle creation
A dSYM bundle is a file hierarchy that looks slike this:
 <bundle name>.dSYM/
     Contents/
        Info.plist
        Resources/
           DWARF/
              <DWARF file(s)>

This is the default output mode of dsymutil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:05:06 +00:00
Frederic Riss
e88f2f375e [dsymutil] Add (unimplemented) --flat option
dsymutil should by default generate dSYM bundles which are filesystem
hierarchies containing the debug info and an additional Info.plist.
Currently llvm-dsymutil emits raw binaries containing the debug info.
This is what we call the 'flat mode'. Add a -f/-flat option that is
supposed to enable that flat mode, but don't wire it for now, only
pass it to the tests that will need it to stay functional once we
do bundle generation by default.
This basically makes this commit NFC and removes the noise from the
actual commit that adds support for bundle generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244269 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:05:01 +00:00
Frederic Riss
9a7f4507ab Thread premissions through sys::fs::create_director{y|ies}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244268 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:04:55 +00:00
Reid Kleckner
cf166560f5 [WinEH] Add documentation motivating the new EH instructions
This adds documentation on how to use the new EH instructions added in
r243766.

Reviewers: majnemer, reames

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 21:01:32 +00:00
Sanjoy Das
93011351ea [IndVars] Fix PR24356.
Unsigned predicates increase or decrease agnostic of the signs of their
increments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 20:43:41 +00:00
Sanjoy Das
95d9915c5c [IndVars] Improved logging under DEBUG(); NFC.
Before this, we'd print the modified comparision in the "Simplified
comparison" case.  That looked misleading.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 20:43:28 +00:00
Pete Cooper
be21eab7ac Convert a bunch of loops to foreach. NFC.
After r244074, we now have a successors() method to iterate over
all the successors of a TerminatorInst.  This commit changes a bunch
of eligible loops to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 20:22:46 +00:00
Rui Ueyama
4752eae71b Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244259 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 20:05:27 +00:00
Tom Stellard
f5063f40fd AMDGPU/SI: Add Fiji support
Patch by: Alex Deucher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:43:02 +00:00
Tom Stellard
825c884e40 AMDGPU/SI: Add support for 32-bit immediate SMRD offsets on CI
Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:28:38 +00:00
Tom Stellard
732a4ceeee AMDGPU/SI: Use ComplexPatterns for SMRD addressing modes
Summary: This allows us to consolidate several of the TableGen patterns.

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244253 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:28:30 +00:00
David Blaikie
01d5be6990 Fix memory leaks by avoiding extra manual dynamic allocation
Improvement to r244212.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244252 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:23:33 +00:00
Nico Weber
a57926b847 Fix nested CrashRecoveryContexts with LLVM_ENABLE_THREADS=OFF, allow them.
libclang uses a CrashRecoveryContext, and building a module does too. If a
module gets built through libclang, nested CrashRecoveryContexts are used.  They
work fine with threads as things are stored in ThreadLocal variables, but in
LLVM_ENABLE_THREADS=OFF builds the two recovery contexts would write to the
same globals.

To fix, keep active CrashRecoveryContextImpls in a list and have the global
point to the innermost one, and do something similar for
tlIsRecoveringFromCrash.

Necessary (but not sufficient) for PR11974 and PR20325

http://reviews.llvm.org/D11770


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:21:25 +00:00
Kostya Serebryany
397ed3e704 [libFuzzer] move the mutators to public interface so that custom mutators may reuse these functions directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:19:55 +00:00
Nico Rieck
3dd7bf5e76 Rename inst_range() to instructions() for consistency. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244248 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:10:45 +00:00
Kit Barton
1c618a4dd4 Fix possible infinite loop in shrink wrapping when searching for save/restore
points.

There is an infinite loop that can occur in Shrink Wrapping while searching 
for the Save/Restore points. 

Part of this search checks whether the save/restore points are located in
different loop nests and if so, uses the (post) dominator trees to find the
immediate (post) dominator blocks. However, if the current block does not have
any immediate (post) dominators then this search will result in an infinite
loop. This can occur in code containing an infinite loop.

The modification checks whether the immediate (post) dominator is different from
the current save/restore block. If it is not, then the search terminates and the
current location is not considered as a valid save/restore point for shrink wrapping.

Phabricator: http://reviews.llvm.org/D11607


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244247 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:01:57 +00:00
Peter Collingbourne
cfb2e81883 LibDriver: Replace references to lld-link2 with lld-link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244246 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 19:00:42 +00:00
Quentin Colombet
f5232c2a9b [Reassociation] Fix miscompile for va_arg arguments.
iisUnmovableInstruction() had a list of instructions hardcoded which are
considered unmovable. The list lacked (at least) an entry for the va_arg
and cmpxchg instructions.
Fix this by introducing a new Instruction::mayBeMemoryDependent()
instead of maintaining another instruction list.

Patch by Matthias Braun <matze@braunis.de>.

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

rdar://problem/22118647


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244244 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 18:44:34 +00:00
Alex Lorenz
dcfc698997 MIR Parser: Report an error when parsing duplicate memory operand flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244240 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 18:26:36 +00:00
Cong Hou
dbc2c060f2 Revert r244154 which causes some build failure. See https://llvm.org/bugs/show_bug.cgi?id=24377.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244239 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 18:17:29 +00:00
Duncan P. N. Exon Smith
66353e36b9 Update docs for accessing !dbg attachments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 18:15:25 +00:00
Kit Barton
87433fc81a This patch changes the interface to enable the shrink wrapping optimization.
It adds a new constructor, which takes a std::function predicate function that
is run at the beginning of shrink wrapping to determine whether the optimization
should run on the given machine function. The std::function can be overridden by
each target, allowing target-specific decisions to be made on each machine
function.

This is necessary for PowerPC, as the decision to run shrink wrapping is
partially based on the ABI. Futhermore, this operates nicely with the GCC iFunc
capability, which allows option overrides on a per-function basis.

Phabricator: http://reviews.llvm.org/D11421


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244235 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 18:02:53 +00:00
Chad Rosier
11c15775e9 [AArch64] Use a static function and other minor cleanup for readability. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 17:37:18 +00:00
Reid Kleckner
8191feddec [cmake] Handle Dragonfly BSD like FreeBSD
Fixes build break reported in PR24358.

Patch by John Marino.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244232 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 17:17:44 +00:00
Reid Kleckner
181ebadd3a docs: Fix typo in Phabricator.rst
Summary: Fix a small typo in Phabricator.rst: s/your/you.

Reviewers: rnk

Subscribers: rnk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244231 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 16:57:49 +00:00
Alex Lorenz
7a40257530 MIR Serialization: Serialize the 'invariant' machine memory operand flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 16:55:53 +00:00
Richard Diamond
972533b0a1 Fix an alignment error in llvm::expandAtomicRMWToCmpXchg without breaking the build where X86 isn't enabled.
Summary: Divide the primitive size in bits by eight so the initial load's alignment is in bytes as expected. Tested with the included unit test.

Reviewers: rengolin, jfb

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244229 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 16:55:03 +00:00