1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

62778 Commits

Author SHA1 Message Date
Hans Wennborg
0eedbce23d Option parsing: allow aliases in groups
Option aliases in option groups were previously disallowed by an assert.
As far as I can tell, there was no technical reason for this, and I would
like to be able to put cl.exe compatible options in their own group for Clang,
so let's change the assert.

llvm-svn: 186838
2013-07-22 16:18:13 +00:00
Mihai Popa
cb970f1789 This adds range checking for "ldr Rn, [pc, #imm]" Thumb
instructions. With this patch:

1. ldr.n is recognized as mnemonic for the short encoding
2. ldr.w is recognized as menmonic for the long encoding
3. ldr will map to either short or long encodings depending on the size of the offset

llvm-svn: 186831
2013-07-22 15:49:36 +00:00
Justin Holewinski
0a7b783785 [NVPTX] Use approximate FP ops when unsafe-fp-math is used, and append
.ftz to instructions if the nvptx-f32ftz attribute is set to "true"

llvm-svn: 186820
2013-07-22 12:18:04 +00:00
Tim Northover
3eb0204626 Revert "More Intel syntax alias fixes."
This reverts commit r186813, which broke the bots.

llvm-svn: 186818
2013-07-22 11:02:32 +00:00
Craig Topper
01a5872b6a Fix typo. Change %cl to CL in Intel pattern.
llvm-svn: 186815
2013-07-22 10:07:26 +00:00
Craig Topper
9f41c21050 More Intel syntax alias fixes.
llvm-svn: 186814
2013-07-22 09:58:07 +00:00
Craig Topper
7f84e2a099 More Intel syntax alias fixes.
llvm-svn: 186813
2013-07-22 09:42:31 +00:00
Craig Topper
73e7313381 Change %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.
llvm-svn: 186812
2013-07-22 09:22:49 +00:00
Craig Topper
91ad9abf00 Add Intel variants to aliases for some FP instructions.
llvm-svn: 186811
2013-07-22 09:18:43 +00:00
Tim Northover
a6d63d6cc9 ARM: remove now unneeded custom Asm converters
After Ulrich's r180677 (thanks!) TableGen is intelligent enough to
handle tied constraints involving complex operands properly, so
virtually all of the ARM custom converters are now unnecessary.

llvm-svn: 186810
2013-07-22 09:06:12 +00:00
Craig Topper
30d02185df Reverse operands for Intel syntax form of 'bt' alias.
llvm-svn: 186809
2013-07-22 07:47:51 +00:00
Nadav Rotem
c15d196f83 Delete unused helper functions.
llvm-svn: 186808
2013-07-22 05:19:22 +00:00
Michael Gottesman
fb309e1237 Added missing - in the header of PrologEpilogInserter.h so that editors properly realize it is a c++ header and not a c header.
llvm-svn: 186801
2013-07-22 00:52:55 +00:00
Richard Smith
15b9b9e375 Treat nothrow forms of ::operator delete and ::operator delete[] as
deallocation functions.

llvm-svn: 186798
2013-07-21 23:11:42 +00:00
Benjamin Kramer
02e86e1f3f mem2reg: Minor STL usage cleanup. No functionality change.
llvm-svn: 186790
2013-07-21 11:03:40 +00:00
Chandler Carruth
a549ad0c21 Make the mem2reg interface use an ArrayRef as it keeps a copy of these
to iterate over.

llvm-svn: 186788
2013-07-21 08:37:58 +00:00
Craig Topper
82f1ff48e7 Mark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.
llvm-svn: 186787
2013-07-21 07:28:13 +00:00
Nadav Rotem
cb987ae696 Revert a part of r186420. Don't forbid multiple store chains that merge.
llvm-svn: 186786
2013-07-21 06:12:57 +00:00
Chandler Carruth
d4299dfcf7 Hoist the rest of the logic for promoting single-store allocas into the
helper function. This leaves both trivial cases handled entirely in
helper functions and merely manages the list of allocas to process in
the run method.

The next step will be to handle all of the trivial promotion work prior
to even creating the core class and the subsequent simplifications that
enables.

llvm-svn: 186784
2013-07-21 01:52:33 +00:00
Chandler Carruth
ee3da824df Hoist the rest of the logic for fully promoting allocas with all uses in
a single block into the helper routine. This takes advantage of the fact
that we can directly replace uses prior to any store with undef to
simplify matters and unconditionally promote allocas only used within
one block.

I've removed the special handling for the case of no stores existing.
This has no semantic effect but might slow things down. I'll fix that in
a later patch when I refactor this entire thing to be easier to manage
the different cases.

llvm-svn: 186783
2013-07-21 01:44:07 +00:00
Chandler Carruth
649189782e Remove a method made dead by the prior refactoring.
llvm-svn: 186782
2013-07-21 00:01:34 +00:00
Chandler Carruth
1522f7782e Hoist the two trivial promotion routines out of the big class that
handles the general cases.

The hope is to refactor this so that we don't end up building the entire
class for the trivial cases. I also want to lift a lot of the early
pre-processing in the initial segment of run() into a separate routine,
and really none of it needs to happen inside the primary promotion
class.

These routines in particular used none of the actual state in the
promotion class, so they don't really make sense as members.

llvm-svn: 186781
2013-07-20 23:59:51 +00:00
Chandler Carruth
4f122f4bf7 Hoist the AllocaInfo struct to the top of the file.
This struct is nicely independent of everything else, and we already
needed a foward declaration here. It's simpler to just define it
immediately.

llvm-svn: 186780
2013-07-20 23:39:26 +00:00
Chandler Carruth
9056374adc Sink a typedef and comparator down to the function that actually uses them.
llvm-svn: 186779
2013-07-20 23:36:19 +00:00
Rafael Espindola
b64a8ded32 Don't crash when llvm.compiler.used becomes empty.
GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.

llvm-svn: 186778
2013-07-20 23:33:15 +00:00
Chandler Carruth
625842576e Don't allocate the DIBuilder on the heap and remove all the complexity
that ensued from that.

llvm-svn: 186777
2013-07-20 23:33:06 +00:00
Chandler Carruth
8a5b9d1ecd Rename constructor parameters to follow the common member-shadowing
pattern and conform to the naming conventions.

llvm-svn: 186776
2013-07-20 23:23:47 +00:00
Chandler Carruth
b93a8119e3 Reformat the implementation of mem2reg with clang-format so that my
subsequent changes don't introduce inconsistencies.

llvm-svn: 186775
2013-07-20 23:20:08 +00:00
Andrew Trick
3a27f5b69d Comment: try to clarify loop iteration order.
llvm-svn: 186774
2013-07-20 23:10:31 +00:00
Chandler Carruth
82ebea7f15 Remove a DenseMapInfo specialization for std::pair -- we have one of
those baked into DenseMap now.

llvm-svn: 186773
2013-07-20 23:09:05 +00:00
Chandler Carruth
cf50f83dfd Update mem2reg's comments to conform to the new doxygen standards. No
functionality changed.

llvm-svn: 186772
2013-07-20 22:20:05 +00:00
Matt Arsenault
ff6bd087c7 Disallow global aliases to bitcast between address spaces
llvm-svn: 186767
2013-07-20 17:46:05 +00:00
Matt Arsenault
3232505141 Remove trailing whitespace, fix file path in comment
llvm-svn: 186766
2013-07-20 17:46:00 +00:00
Benjamin Kramer
78617fc38a SROA: Microoptimization: Remove dead entries first, then sort.
While there replace an explicit struct with std::mem_fun.

llvm-svn: 186761
2013-07-20 08:38:34 +00:00
Stephen Lin
5a583ae2f7 InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul
llvm-svn: 186759
2013-07-20 07:13:13 +00:00
Matt Arsenault
47a9a42835 Have InlineCost check constant fcmps
llvm-svn: 186758
2013-07-20 04:09:00 +00:00
Manman Ren
e130e02443 Debug Info Verifier: simplify DIxxx::Verify
Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

llvm-svn: 186737
2013-07-20 00:38:46 +00:00
Matt Arsenault
2dbfab3c32 Fix size_t -> uint warnings with MSVC 64-bit build
llvm-svn: 186736
2013-07-20 00:20:10 +00:00
Lang Hames
2d3b19969c Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll). 

<rdar://problem/14464830>

llvm-svn: 186735
2013-07-19 23:52:47 +00:00
Rui Ueyama
f2baef0d6e Retry submitting r186623: COFFDumper: Dump data directory entries.
The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.

llvm-svn: 186734
2013-07-19 23:23:29 +00:00
Nadav Rotem
85fcd9dde0 fix an 80-col line.
llvm-svn: 186733
2013-07-19 23:14:01 +00:00
Nadav Rotem
43e3cf61bf Use LLVMs ADTs that improve the compile time of this pass.
llvm-svn: 186732
2013-07-19 23:12:19 +00:00
Nadav Rotem
aead8bb4d6 SLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions that check GEPs and eliminate two of the calls to accumulateConstantOffset.
llvm-svn: 186731
2013-07-19 23:11:15 +00:00
Vincent Lejeune
946e631d0f R600: Don't emit empty then clause and use alu_pop_after
llvm-svn: 186725
2013-07-19 21:45:15 +00:00
Vincent Lejeune
0872500c7d R600: Simplify AMDILCFGStructurize by removing templates and assuming single exit
llvm-svn: 186724
2013-07-19 21:45:06 +00:00
Vincent Lejeune
2bcf101e52 R600: Replace legacy debug code in AMDILCFGStructurizer.cpp
llvm-svn: 186723
2013-07-19 21:44:56 +00:00
Rafael Espindola
6178a47aa5 s/compiler_used/compiler.used/.
We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

llvm-svn: 186705
2013-07-19 18:44:51 +00:00
Reid Kleckner
045ec611a0 [Option] Add inclusion and exclusion flags to option parsing
Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1049

llvm-svn: 186703
2013-07-19 18:04:57 +00:00
Joey Gouly
c0c0031fbe Add a line that got missed off somehow. Sorry about that!
llvm-svn: 186692
2013-07-19 16:45:16 +00:00
Richard Sandiford
fe2faa0d5b [SystemZ] Add ALRK, AGLRK, SLRK and SGLRK
Follows the same lines as r186686, but much more limited, since we only
use ADD LOGICAL for multi-i64 additions.

llvm-svn: 186689
2013-07-19 16:37:00 +00:00