Commit Graph

120416 Commits

Author SHA1 Message Date
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
Alex Lorenz
3c4339b0dc MIR Serialization: Serialize the 'non-temporal' machine memory operand flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244228 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 16:49:30 +00:00
Chad Rosier
535cac4261 [AArch64] Improve the readability of the ld/st optimization pass. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 15:50:12 +00:00
Douglas Katzman
d7d997277a [SPARC] Don't compare arch name as a string, use the enum instead.
Fixes PR22695

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244221 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 15:44:12 +00:00
Rafael Espindola
437cb16a8c Reuse variable. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244214 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 14:51:02 +00:00
Aaron Ballman
3d3d5ae1db Silencing a -Wtype-limits warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244213 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 14:07:29 +00:00
Yaron Keren
639ab38ca8 Plug memory leaks in AsmWriterEmitter::EmitPrintAliasInstruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244212 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 13:18:59 +00:00
Chad Rosier
97f89e5b92 Fix minor typos. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244211 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 12:49:40 +00:00
Renato Golin
7809bb2e96 Revert "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."
This reverts commit r244155, as it was breaking the buildbots for too long.
Should be reapplied with proper fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 10:37:59 +00:00
NAKAMURA Takumi
47e91a8102 llvm/lib/IR/AttributeImpl.h: Move comment block not to cover typedef, introduced in r244164. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 09:49:17 +00:00
Michael Liao
da135386a4 Removing tailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 09:06:20 +00:00
Michael Kuperstein
1fc0f627b1 [X86] Improve EmitLoweredSelect for contiguous CMOV pseudo instructions.
This change improves EmitLoweredSelect() so that multiple contiguous CMOV pseudo
instructions with the same (or exactly opposite) conditions get lowered using a single
new basic-block. This eliminates unnecessary extra basic-blocks (and CFG merge points)
when contiguous CMOVs are being lowered.

Patch by: kevin.b.smith@intel.com
Differential Revision: http://reviews.llvm.org/D11428


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 08:45:34 +00:00
Chandler Carruth
e29d3ef447 [PM/AA] Clean up and homogenize comments throughout basic-aa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244200 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 08:17:06 +00:00
Yaron Keren
f10e43020c Fix Visual C++ error C2248:
'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>::additionalSizeToAlloc' :
cannot access protected member declared in class
 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>'

 I'm not sure how this compiles with gcc.
 Aren't protecteded members accessible only with protected or public inheritance?
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244199 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 07:59:26 +00:00
Chandler Carruth
940e92b193 [PM/AA] Run clang-format over all of basic-aa before making more
substantive edits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244198 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 07:57:58 +00:00
Chandler Carruth
734c778cb2 [PM/AA] Hoist the interface for BasicAA into a header file.
This is the first mechanical step in preparation for making this and all
the other alias analysis passes available to the new pass manager. I'm
factoring out all the totally boring changes I can so I'm moving code
around here with no other changes. I've even minimized the formatting
churn.

I'll reformat and freshen comments on the interface now that its located
in the right place so that the substantive changes don't triger this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244197 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 07:33:15 +00:00
Peter Collingbourne
f4fa49e750 COFF: Assign the correct symbol type to internal functions.
The COFFSymbolRef::isFunctionDefinition() function tests for several conditions
that are not related to whether a symbol is a function, but rather whether
the symbol meets the requirements for a function definition auxiliary record,
which excludes certain symbols such as internal functions and undefined
references. The test we need to determine the symbol type is much simpler:
we only need to compare the complex type against IMAGE_SYM_DTYPE_FUNCTION.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 05:26:35 +00:00
Chandler Carruth
da5300489f [PM/AA] Simplify the AliasAnalysis interface by removing a wrapper
around a DataLayout interface in favor of directly querying DataLayout.

This wrapper specifically helped handle the case where this no
DataLayout, but LLVM now requires it simplifynig all of this. I've
updated callers to directly query DataLayout. This in turn exposed
a bunch of places where we should have DataLayout readily available but
don't which I've fixed. This then in turn exposed that we were passing
DataLayout around in a bunch of arguments rather than making it readily
available so I've also fixed that.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244189 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 02:05:46 +00:00
Kostya Serebryany
596885b016 [libFuzzer] add one more mutation strategy: byte shuffling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 01:29:13 +00:00
Alex Lorenz
3c99e77ff9 MIR Serialization: Initial serialization of the machine operand target flags.
This commit implements the initial serialization of the machine operand target
flags. It extends the 'TargetInstrInfo' class to add two new methods that help
to provide text based serialization for the target flags.

This commit can serialize only the X86 target flags, and the target flags for
the other targets will be serialized in the follow-up commits.

Reviewers: Duncan P. N. Exon Smith


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 00:44:07 +00:00
Davide Italiano
0de2088479 [llvm-objdump] Add missing call to exit(1).
Reported by: Rafael Espindola.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06 00:18:52 +00:00
Frederic Riss
349b419025 Revert "Make sure all temporary files get created under %T."
This reverts commit r244163. The workaround shouldn't be necessary
after r244172, and moreover the commit was slightly buggy as it
dis a simple mkdir without removing the directory first, which could
cause 'File exists' errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244182 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05 23:53:38 +00:00