1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
Commit Graph

87429 Commits

Author SHA1 Message Date
Nadav Rotem
2c25a05088 LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size.
llvm-svn: 170004
2012-12-12 19:29:45 +00:00
Bill Schmidt
7a93daad1a This patch implements local-dynamic TLS model support for the 64-bit
PowerPC target.  This is the last of the four models, so we now have 
full TLS support.

This is mostly a straightforward extension of the general dynamic model.
I had to use an additional Chain operand to tie ADDIS_DTPREL_HA to the
register copy following ADDI_TLSLD_L; otherwise everything above the
ADDIS_DTPREL_HA appeared dead and was removed.

As before, there are new test cases to test the assembly generation, and
the relocations output during integrated assembly.  The expected code
gen sequence can be read in test/CodeGen/PowerPC/tls-ld.ll.

There are a couple of things I think can be done more efficiently in the
overall TLS code, so there will likely be a clean-up patch forthcoming;
but for now I want to be sure the functionality is in place.

Bill

llvm-svn: 170003
2012-12-12 19:29:35 +00:00
Bill Wendling
afd0f773dd Kerning.
llvm-svn: 170002
2012-12-12 19:21:53 +00:00
Dmitri Gribenko
904ef47060 Documentation: llvm-bcanalyzer.rst: cleanup.
llvm-svn: 170001
2012-12-12 19:15:53 +00:00
Dmitri Gribenko
b429bfacf0 Documentation: AliasAnalysis.rst: improve internal and external links
llvm-svn: 169993
2012-12-12 17:03:50 +00:00
Dmitri Gribenko
a773f03a32 Documentation: convert WritingAnLLVMPass.html to reST.
Patch by Anthony Mykhailenko with small fixes by me.

llvm-svn: 169992
2012-12-12 17:02:44 +00:00
Dmitri Gribenko
8fd8426bd2 Documentation: cleanup
llvm-svn: 169990
2012-12-12 16:58:13 +00:00
Rafael Espindola
a77a0b105f The TargetData is not used for the isPowerOfTwo determination. It has never
been used in the first place.  It simply was passed to the function and to the
recursive invocations.  Simply drop the parameter and update the callers for the
new signature.

Patch by Saleem Abdulrasool!

llvm-svn: 169988
2012-12-12 16:52:40 +00:00
Alexey Samsonov
46f9cc5d51 Improve debug info generated with enabled AddressSanitizer.
When ASan replaces <alloca instruction> with
<offset into a common large alloca>, it should also patch
llvm.dbg.declare calls and replace debug info descriptors to mark
that we've replaced alloca with a value that stores an address
of the user variable, not the user variable itself.

See PR11818 for more context.

llvm-svn: 169984
2012-12-12 14:31:53 +00:00
Dmitri Gribenko
a244713fc0 Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.

llvm-svn: 169981
2012-12-12 14:23:14 +00:00
Dmitri Gribenko
8a382641f3 Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.

llvm-svn: 169979
2012-12-12 13:56:37 +00:00
NAKAMURA Takumi
dd5710ee32 llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK-NOT lines.
Found by Alexander Zinenko, thanks!

llvm-svn: 169978
2012-12-12 13:34:20 +00:00
NAKAMURA Takumi
c72211f140 llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test/g, not to mismatch "CHECK(-NOT): test".
llvm-svn: 169977
2012-12-12 13:34:14 +00:00
Logan Chien
1718e35c26 Add ARM NONE and PREL31 relocation types.
Add R_ARM_NONE and R_ARM_PREL31 relocation types
to MCExpr.  Both of them will be used while
generating .ARM.extab and .ARM.exidx sections.

llvm-svn: 169965
2012-12-12 07:14:46 +00:00
Rafael Espindola
a0cba71be8 Remove some dead code.
llvm-svn: 169963
2012-12-12 06:18:15 +00:00
NAKAMURA Takumi
11a0e2a8bf [CMake] Fixup R600.
llvm-svn: 169962
2012-12-12 03:34:26 +00:00
Evan Cheng
e42df0ea81 Sorry about the churn. One more change to getOptimalMemOpType() hook. Did I
mention the inline memcpy / memset expansion code is a mess?

This patch split the ZeroOrLdSrc argument into two: IsMemset and ZeroMemset.
The first indicates whether it is expanding a memset or a memcpy / memmove.
The later is whether the memset is a memset of zero. It's totally possible
(likely even) that targets may want to do different things for memcpy and
memset of zero.

llvm-svn: 169959
2012-12-12 02:34:41 +00:00
NAKAMURA Takumi
a8082b1db8 llvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/
llvm-svn: 169957
2012-12-12 01:41:01 +00:00
NAKAMURA Takumi
4a729c7cd2 llvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.
llvm-svn: 169956
2012-12-12 01:40:56 +00:00
Nadav Rotem
8d59a4ff51 Fix the ascii drawing that was ruined when I split the H and CPP
llvm-svn: 169955
2012-12-12 01:33:47 +00:00
Evan Cheng
d1c2821678 - Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Also added more comments to explain why it is generally ok to return true.
- Rename getOptimalMemOpType argument IsZeroVal to ZeroOrLdSrc. It's meant to
be true for loaded source (memcpy) or zero constants (memset). The poor name
choice is probably some kind of legacy issue.

llvm-svn: 169954
2012-12-12 01:32:07 +00:00
Nadav Rotem
1696945e9d fix a typo.
llvm-svn: 169953
2012-12-12 01:31:10 +00:00
Manman Ren
d29a3f8737 DAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion
rdar://12838504

llvm-svn: 169951
2012-12-12 01:13:50 +00:00
Nadav Rotem
edcebe4904 LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag.
llvm-svn: 169950
2012-12-12 01:11:46 +00:00
Evan Cheng
0e6ff04636 Avoid using lossy load / stores for memcpy / memset expansion. e.g.
f64 load / store on non-SSE2 x86 targets.

llvm-svn: 169944
2012-12-12 00:42:09 +00:00
Michael Ilseman
243f64c4bd Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
llvm-svn: 169943
2012-12-12 00:29:16 +00:00
Shuxin Yang
0b24765e3f - Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.

llvm-svn: 169942
2012-12-12 00:29:03 +00:00
Michael Ilseman
8e297c097a Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction
llvm-svn: 169941
2012-12-12 00:28:32 +00:00
Michael Ilseman
5db40ba98e Added a slew of SimplifyInstruction floating-point optimizations, many of which take advantage of fast-math flags. Test cases included.
fsub X, +0 ==> X
  fsub X, -0 ==> X, when we know X is not -0
  fsub +/-0.0, (fsub -0.0, X) ==> X
  fsub nsz +/-0.0, (fsub +/-0.0, X) ==> X
  fsub nnan ninf X, X ==> 0.0
  fadd nsz X, 0 ==> X
  fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0
    where nnan and ninf have to occur at least once somewhere in this expression
  fmul X, 1.0 ==> X

llvm-svn: 169940
2012-12-12 00:27:46 +00:00
Michael Ilseman
515ea526f3 Pattern matchers for floating point values
m_ConstantFP - match and bind a float constant
m_SpecificConstantFP - match a specific floating point value or vector of floats of that value
m_FPOne - match a floating point 1.0 or vector of 1.0s
m_NegZero - match -0.0
m_AnyZero - match 0 or -0.0

llvm-svn: 169939
2012-12-12 00:23:43 +00:00
Michael Ilseman
42042d4bd8 Remove FIXMEs surrounding Constant[Data]Vectors, instead
llvm-svn: 169938
2012-12-12 00:21:43 +00:00
Jim Grosbach
529ac76fa2 Trim unneeded header #include.
llvm-svn: 169933
2012-12-11 23:39:51 +00:00
Dmitri Gribenko
d5a3fbf03a Documentation: cleanup: remove useless anchors and write :ref:s explicitly.
llvm-svn: 169932
2012-12-11 23:35:23 +00:00
Jim Grosbach
5c24898d2a ARM: Remove old testing option.
Pre-regalloc frame allocation and referencing has been on by default
for ages. No need for the testing option that disables it.

llvm-svn: 169931
2012-12-11 23:31:12 +00:00
Jim Grosbach
969f11d9cd ARM: Remove old testing options.
Base pointer referencing has been enabled for ages.

llvm-svn: 169930
2012-12-11 23:31:10 +00:00
Evan Cheng
b9b90d7aed Replace TargetLowering::isIntImmLegal() with
ScalarTargetTransformInfo::getIntImmCost() instead. "Legal" is a poorly defined
term for something like integer immediate materialization. It is always possible
to materialize an integer immediate. Whether to use it for memcpy expansion is
more a "cost" conceern.

llvm-svn: 169929
2012-12-11 23:26:14 +00:00
Dmitri Gribenko
8321a7c2f4 Documentation: Lexicon.rst: add 'SLP' acronym
llvm-svn: 169928
2012-12-11 23:13:23 +00:00
Nadav Rotem
054379720d PR14574. Fix a bug in the code that calculates the mask the converted PHIs in if-conversion.
llvm-svn: 169916
2012-12-11 21:30:14 +00:00
Tom Stellard
6f17e7033b Add R600 backend
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX

llvm-svn: 169915
2012-12-11 21:25:42 +00:00
Bill Schmidt
45b56f7632 This patch implements the general dynamic TLS model for 64-bit PowerPC.
Given a thread-local symbol x with global-dynamic access, the generated
code to obtain x's address is:

     Instruction                            Relocation            Symbol
  addis ra,r2,x@got@tlsgd@ha           R_PPC64_GOT_TLSGD16_HA       x
  addi  r3,ra,x@got@tlsgd@l            R_PPC64_GOT_TLSGD16_L        x
  bl __tls_get_addr(x@tlsgd)           R_PPC64_TLSGD                x
                                       R_PPC64_REL24           __tls_get_addr
  nop
  <use address in r3>

The implementation borrows from the medium code model work for introducing
special forms of ADDIS and ADDI into the DAG representation.  This is made
slightly more complicated by having to introduce a call to the external
function __tls_get_addr.  Using the full call machinery is overkill and,
more importantly, makes it difficult to add a special relocation.  So I've
introduced another opcode GET_TLS_ADDR to represent the function call, and
surrounded it with register copies to set up the parameter and return value.

Most of the code is pretty straightforward.  I ran into one peculiarity
when I introduced a new PPC opcode BL8_NOP_ELF_TLSGD, which is just like
BL8_NOP_ELF except that it takes another parameter to represent the symbol
("x" above) that requires a relocation on the call.  Something in the 
TblGen machinery causes BL8_NOP_ELF and BL8_NOP_ELF_TLSGD to be treated
identically during the emit phase, so this second operand was never
visited to generate relocations.  This is the reason for the slightly
messy workaround in PPCMCCodeEmitter.cpp:getDirectBrEncoding().

Two new tests are included to demonstrate correct external assembly and
correct generation of relocations using the integrated assembler.

Comments welcome!

Thanks,
Bill

llvm-svn: 169910
2012-12-11 20:30:11 +00:00
Eric Christopher
1a93fc9d67 Update some comments.
llvm-svn: 169907
2012-12-11 19:42:09 +00:00
Nadav Rotem
fb45c4d6b4 Loop Vectorize: optimize the vectorization of trunc(induction_var). The truncation is now done on scalars.
llvm-svn: 169904
2012-12-11 18:58:10 +00:00
Eli Bendersky
97c09cbfb6 Remove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
because that method is only getting called for MCInstFragment. These
fragments aren't even generated when RelaxAll is set, which is why the
flag reference here is superfluous. Removing it simplifies the code
with no harmful effects.

An assertion is added higher up to make sure this path is never
reached.

llvm-svn: 169886
2012-12-11 17:16:00 +00:00
Rafael Espindola
03394e4dc6 Use an ArrayRef instead of a std::vector&.
llvm-svn: 169881
2012-12-11 16:36:02 +00:00
Joel Jones
0038ea3653 Add comment for load folding
llvm-svn: 169880
2012-12-11 16:10:25 +00:00
Dmitri Gribenko
b9ee3b0c67 Documentation: convert Passes.html to reST.
Since now we have an autogenerated TOC, a manually written table of all passes
was removed.

Patch by Anthony Mykhailenko with small fixes by me.

llvm-svn: 169867
2012-12-11 15:29:37 +00:00
NAKAMURA Takumi
231a6d09fc llvm/test/TableGen: Remove XFAIL:vg_leak in dozen of tests, according to llvm-x86_64-linux-vg_leak.
llvm-svn: 169862
2012-12-11 13:14:16 +00:00
Evgeniy Stepanov
fee15f88f9 [msan] Use explicitely aligned stores and loads with function argument shadow.
Use explicitely aligned store and load instructions to deal with argument and
retval shadow. This matters when an argument's alignment is higher than
__msan_param_tls alignment (which is the case with __m128i).

llvm-svn: 169859
2012-12-11 12:34:09 +00:00
Patrik Hagglund
caaedc6ade Revert EVT->MVT changes, r169836-169851, due to buildbot failures.
llvm-svn: 169854
2012-12-11 11:14:33 +00:00
Chandler Carruth
a503c881e5 Holding my nose and moving the accumulation routine to GEPOperator
instead of the instruction. I've left a forwarding wrapper for the
instruction so users with the instruction don't need to create
a GEPOperator themselves.

This lets us remove the copy of this code in instsimplify.

I've looked at most of the other copies of similar code, and this is the
only one I've found that is actually exactly the same. The one in
InlineCost is very close, but it requires re-mapping non-constant
indices through the cost analysis value simplification map. I could add
direct support for this to the generic routine, but it seems overly
specific.

llvm-svn: 169853
2012-12-11 11:05:15 +00:00