Commit Graph

173776 Commits

Author SHA1 Message Date
Jim Ingham 1624a2d3c8 Make the Expression Execution result enum available to the SB API layer.
Add a callback that will allow an expression to be cancelled between the
expression evaluation stages (for the ClangUserExpressions.)

<rdar://problem/16790467>, <rdar://problem/16573440>

llvm-svn: 207944
2014-05-05 02:26:40 +00:00
Saleem Abdulrasool e8a7afef86 CodeGen: correct memset emittance for WoA
Windows on ARM does not conform to AEABI.  However, memset would be emitted
using the AEABI signature, resulting in inverted parameters.  Handle this
special case appropriately.

llvm-svn: 207943
2014-05-04 23:13:21 +00:00
Saleem Abdulrasool 9c4716e4b6 CodeGen: strengthen WoA AEABI avoidance tests
Add additional test cases for WoA AEABI avoidance checking.

llvm-svn: 207942
2014-05-04 23:13:18 +00:00
Saleem Abdulrasool 729c7a08fb MC: support FK_SecRel_4 for Windows on ARM
Add handling for FK_SecRel_4 (4-byte section relative relocations).  These are
used by the generation of DWARF debug information (the abbrevations use section
relative relocations).  This will also be used in generation of CodeView line
tables.

llvm-svn: 207941
2014-05-04 23:13:15 +00:00
Benjamin Kramer 9130cb8547 LoopUnroll: If we're doing partial unrolling, use the PartialThreshold to limit unrolling.
Otherwise we use the same threshold as for complete unrolling, which is
way too high. This made us unroll any loop smaller than 150 instructions
by 8 times, but only if someone specified -march=core2 or better,
which happens to be the default on darwin.

llvm-svn: 207940
2014-05-04 19:12:38 +00:00
Arnold Schwaighofer cd566c423a SLPVectorizer: Bring back the insertelement patch (r205965) with fixes
When can't assume a vectorized tree is rooted in an instruction. The IRBuilder
could have constant folded it. When we rebuild the build_vector (the series of
InsertElement instructions) use the last original InsertElement instruction. The
vectorized tree root is guaranteed to be before it.

Also, we can't assume that the n-th InsertElement inserts the n-th element into
a vector.

This reverts r207746 which reverted the revert of the revert of r205018 or so.

Fixes the test case in PR19621.

llvm-svn: 207939
2014-05-04 17:10:15 +00:00
Joerg Sonnenberger c72473d87b Try harder to get the compiler to use float registers in different
places to increase the chance of messing up any preserved registers.

llvm-svn: 207938
2014-05-04 16:31:33 +00:00
Elena Demikhovsky e73333a50f AVX-512: minor change in rndscale intrinsic
llvm-svn: 207937
2014-05-04 13:35:37 +00:00
Alp Toker a01285c4b3 Split out header integration tests
These are somewhat arbitrary tests that check if "thing goes fine" when
processing various platform-specific headers.

Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure
tests live.

File moves only.

llvm-svn: 207936
2014-05-04 13:00:32 +00:00
Chandler Carruth 312dddfb81 [LCG] Add the last (and most complex) of the edge insertion mutation
operations on the call graph. This one forms a cycle, and while not as
complex as removing an internal edge from an SCC, it involves
a reasonable amount of work to find all of the nodes newly connected in
a cycle.

Also somewhat alarming is the worst case complexity here: it might have
to walk roughly the entire SCC inverse DAG to insert a single edge. This
is carefully documented in the API (I hope).

llvm-svn: 207935
2014-05-04 09:38:32 +00:00
Chandler Carruth cc6e1877d7 [LCG] Reorder the tests to be a bit more logical: inter-SCC mutation
before intra-SCC mutation, insertion before removal.

No functionality changed.

llvm-svn: 207934
2014-05-04 09:38:23 +00:00
Argyrios Kyrtzidis d113788ecb Speculative fix to unbreak the buildbots that fail with compiler errors.
llvm-svn: 207933
2014-05-04 05:27:24 +00:00
Ben Langmuir 027731d7b5 Fix a use-after-free bug I recently introduced in lookupModuleFile
llvm-svn: 207932
2014-05-04 05:20:54 +00:00
Argyrios Kyrtzidis 1b1256a1b1 [Modules] Add the resource-dir to the module hash.
llvm-svn: 207931
2014-05-04 04:35:31 +00:00
Saleem Abdulrasool 956c2ec532 CodeGen: complete ARM ACLE hint 8.4 support
Add support for the remaining hints from the ACLE.  Although __dbg is listed as
a hint, it is handled different, so it is not covered by this change.

llvm-svn: 207930
2014-05-04 02:52:25 +00:00
Saleem Abdulrasool 6323a2d63c Target: fix wchar_t definition for Windows on ARM
Windows on ARM uses AAPCS, but has some deviations.  wchar_t remains an unsigned
short on WoA, which does not conform to AAPCS.  Ensure that wchar_t is defined
accordingly.

llvm-svn: 207929
2014-05-04 01:56:04 +00:00
Saleem Abdulrasool 3c82b499a0 X86: further range-loopify AsmPrinter
Use more range loops in the X86AsmPrinter.  NFC.

llvm-svn: 207928
2014-05-04 01:54:17 +00:00
Saleem Abdulrasool b942035bae X86: remove X86COFFMachineModuleInfo
Remove dead code.  This is vestigial after r98384.

llvm-svn: 207927
2014-05-04 01:54:12 +00:00
Saleem Abdulrasool 82b69fa105 X86: repair export compatibility with MinGW/cygwin
Both MinGW and cygwin (i686) construct export directives without the global
leader prefix.  This is mostly due to the fact that they use GNU ld which does
not correctly handle the export directive.  This apparently has been been broken
for a while.  However, this was recently reported as being broken by
mingwandroid and diorcety of the msys2 project.

Remove the global leader prefix if targeting MinGW or cygwin, otherwise, retain
the global leader prefix.  Add an explicit test for cygwin's behaviour of export
directives.

llvm-svn: 207926
2014-05-04 00:03:48 +00:00
Saleem Abdulrasool 75e68cbd12 X86: refactor export directive generation
Create a helper function to generate the export directive.  This was previously
duplicated inline to handle export directives for variables and functions.  This
also enables the use of range-based iterators for the generation of the
directive rather than the traditional loops.  NFC.

llvm-svn: 207925
2014-05-04 00:03:41 +00:00
David Majnemer cf63a79818 IR: Cleanup AttributeSet::get for AttrBuilder
We don't modify the AttrBuilder in AttributeSet::get, make the reference
argument const.

llvm-svn: 207924
2014-05-03 23:00:35 +00:00
Juergen Ributzka d35c114d15 [TBAA] Fix handling of mixed TBAA (path-aware and non-path-aware TBAA).
This fix simply ensures that both metadata nodes are path-aware before
performing path-aware alias analysis.

This issue isn't normally triggered in LLVM, because we perform an autoupgrade
of the TBAA metadata to the new format when reading in LL or BC files. This
issue only appears when a client creates the IR manually and mixes old and new
TBAA metadata format.

This fixes <rdar://problem/16760860>.

llvm-svn: 207923
2014-05-03 22:32:52 +00:00
Nico Weber dfc592092c Minor cleanups, no behavior change.
* Fixes a "return" that was indented at the same level as the continuation
  from the previous line
* Wrap several lines to 80 columns
* Remove an if check that was always true
* Move a variable declaration slightly closer to its use

llvm-svn: 207922
2014-05-03 22:07:35 +00:00
Nico Weber 83ea012591 Wrap a few lines at 80 columns, change a confusing indent. No behavior change.
llvm-svn: 207921
2014-05-03 21:57:40 +00:00
Rafael Espindola 3d082fa507 Fix pr19645.
The fix itself is fairly simple: move getAccessVariant to MCValue so that we
replace the old weak expression evaluation with the far more general
EvaluateAsRelocatable.

This then requires that EvaluateAsRelocatable stop when it finds a non
trivial reference kind. And that in turn requires the ELF writer to look
harder for weak references.

Last but not least, this found a case where we were being bug by bug
compatible with gas and accepting an invalid input. I reported pr19647
to track it.

llvm-svn: 207920
2014-05-03 19:57:04 +00:00
Benjamin Kramer 834652ade0 Replace one-element SmallVectors inside DenseMaps with TinyPtrVector.
That's exactly what TinyPtrVector was designed for. No functionality change.

llvm-svn: 207919
2014-05-03 18:44:26 +00:00
Joey Gouly b0afd1b929 [ARM64] Correctly select ANDWri in FastISel.
http://reviews.llvm.org/D3598

llvm-svn: 207917
2014-05-03 17:27:06 +00:00
Benjamin Kramer 64425fe875 SLPVectorizer: Lazily allocate the map for block numbering.
There is no point in creating it if we're not going to vectorize
anything. Creating the map is expensive as it creates large values.
No functionality change.

llvm-svn: 207916
2014-05-03 15:50:37 +00:00
Rafael Espindola 80df4bb10f Rename member variable to try to fix the bots.
llvm-svn: 207915
2014-05-03 15:28:13 +00:00
Alp Toker 56ae58c053 Update docs still mentioning LLVM_ENABLE_CXX11
C++11 is now required.

llvm-svn: 207914
2014-05-03 15:10:04 +00:00
Alp Toker cf55e88a11 Track recent changes in clang internals
llvm-svn: 207913
2014-05-03 15:05:45 +00:00
Alp Toker 01d9c64055 Remove obsolete CXX11 buld instructions
There's an element of guesswork involved in the GCC updates but it seems better
than what was there before.

llvm-svn: 207912
2014-05-03 15:05:40 +00:00
Rafael Espindola 83ceb8edfb Move LTOModule and LTOCodeGenerator to the llvm namespace.
llvm-svn: 207911
2014-05-03 14:59:52 +00:00
Rafael Espindola 9d4f24a34b Style fix: don't duplicate the method names.
llvm-svn: 207910
2014-05-03 14:46:47 +00:00
Rafael Espindola b62e6b4535 Style update: don't duplicate comments, they were getting out of sync.
llvm-svn: 207909
2014-05-03 14:34:48 +00:00
Benjamin Kramer f6ba52b947 Remove unused diagnostics.
llvm-svn: 207908
2014-05-03 12:32:50 +00:00
Joerg Sonnenberger e9a72d54c7 Don't use bash features.
llvm-svn: 207907
2014-05-03 12:09:55 +00:00
Yaron Keren 81bb415096 Updated Doxygen link for InstIterator.h.
llvm-svn: 207906
2014-05-03 12:06:13 +00:00
Simon Atanasyan 1e3edf98cb [ELFYAML] Group ELF header falgs to target specific blocks. Handle flags
which are corresponding to the current target read from the ELF file.

This fix cannot be tested until obj2yaml does not support ELF format.

llvm-svn: 207905
2014-05-03 11:39:50 +00:00
Simon Atanasyan 9a922c4ffd [ELFYAML] Add more SHT_xxx flags to the YAML section type mapping.
llvm-svn: 207904
2014-05-03 11:39:44 +00:00
Yaron Keren d9c0bedc29 InstIterator.h lives in llvm/IR.
llvm-svn: 207903
2014-05-03 11:30:49 +00:00
Chandler Carruth 7ff07727b5 [leaks] The PDFileEntry nodes in the FilesMade FoldingSet contain
a std::vector that allocates on the heap. As a consequence, we have to
run all of their destructors when tearing down the set, not just
deallocate the memory blobs.

llvm-svn: 207902
2014-05-03 10:39:05 +00:00
Karthik Bhat ddd0cb5ecf Vectorize intrinsic math function calls in SLPVectorizer.
This patch adds support to recognize and vectorize intrinsic math functions in SLPVectorizer.
Review: http://reviews.llvm.org/D3560 and http://reviews.llvm.org/D3559

llvm-svn: 207901
2014-05-03 09:59:54 +00:00
Chandler Carruth e6c980c41d [leaks] Re-shuffle code such that we don't create a basic block for
initializing an array unless we need it. Specifically, position the
creation of a new basic block after we've checked all of the cases that
bypass the need for it.

Fixes another leak in test/CodeGen* found by LSan.

llvm-svn: 207900
2014-05-03 09:16:57 +00:00
Chandler Carruth 81f9e02ef3 [leaks] Don't leak the fake arguments we synthesize for LLVM option
parsing.

llvm-svn: 207899
2014-05-03 08:39:35 +00:00
Alp Toker 0804343733 Eliminate ASTContext's DelayInitialization flag
Having various possible states of initialization following construction doesn't
add value here.

Also remove the unused size_reserve parameter.

llvm-svn: 207897
2014-05-03 03:46:04 +00:00
Alp Toker b6cc592ea3 Fix a bunch of mislayered clang/Lex includes from Sema
llvm-svn: 207896
2014-05-03 03:45:55 +00:00
Alp Toker b7b579aa93 Update Preprocessor::Initialize() documentation following r207825
llvm-svn: 207895
2014-05-03 03:45:43 +00:00
David Majnemer 085b111d32 CodeGen: Cleanup ABIArgInfo
ABIArgInfo was pretty hard to grok, it had data members with names like
"BoolData0" and "UIntData".  Constructors with lots of bool arguments.
Reusing the same data member for multiple purposes.

It was also wasteful with memory, this new layout is 8 bytes smaller.

llvm-svn: 207894
2014-05-03 02:23:35 +00:00
David Majnemer a2245271af Revert "Sema: Implement DR244"
This was accidentally committed.

This reverts commit r207892.

llvm-svn: 207893
2014-05-03 02:22:11 +00:00