oota-llvm.git
11 years ago[ms-inline asm] Make sure we fail gracefully on parse errors. Parse errors
Chad Rosier [Wed, 12 Dec 2012 22:45:52 +0000 (22:45 +0000)]
[ms-inline asm] Make sure we fail gracefully on parse errors.  Parse errors
should only occur on invalid input.  Instruction matching errors aren't
unexpected, so we can't rely on the AsmParsers HadError variable directly.
rdar://12840278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170037 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoYAMLIO: Remove all of the template instantiation hacks, I don't see why they're neces...
Benjamin Kramer [Wed, 12 Dec 2012 22:40:02 +0000 (22:40 +0000)]
YAMLIO: Remove all of the template instantiation hacks, I don't see why they're necessary and it breaks linking of the unit tests.

Also comes with a clang-format run on the cpp file, it had major style violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170036 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTemporarily disable test cases until they compile with g++ too.
Nick Kledzik [Wed, 12 Dec 2012 22:39:45 +0000 (22:39 +0000)]
Temporarily disable test cases until they compile with g++ too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170035 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUnbreak the build. Fallout from r170019.
David Blaikie [Wed, 12 Dec 2012 22:14:32 +0000 (22:14 +0000)]
Unbreak the build. Fallout from r170019.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170033 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAlignedCharArrayUnion is erroring with non-clang compilers
Nick Kledzik [Wed, 12 Dec 2012 22:03:57 +0000 (22:03 +0000)]
AlignedCharArrayUnion is erroring with non-clang compilers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170031 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix calls to getAsSignedInteger() to use long long - not int64_t
Nick Kledzik [Wed, 12 Dec 2012 21:42:49 +0000 (21:42 +0000)]
Fix calls to getAsSignedInteger() to use long long - not int64_t

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170030 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMakefile.sphinx: reST conversion is complete!
Dmitri Gribenko [Wed, 12 Dec 2012 21:35:43 +0000 (21:35 +0000)]
Makefile.sphinx: reST conversion is complete!

No need to copy HTML files anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170029 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: use paths relative to document root in links.
Dmitri Gribenko [Wed, 12 Dec 2012 21:16:29 +0000 (21:16 +0000)]
Documentation: use paths relative to document root in links.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170027 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo, which prevent test from being check.
Jakub Staszak [Wed, 12 Dec 2012 21:10:56 +0000 (21:10 +0000)]
Fix typo, which prevent test from being check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170025 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRestore the PHI optimization I accidently removed
Michael Ilseman [Wed, 12 Dec 2012 20:59:36 +0000 (20:59 +0000)]
Restore the PHI optimization I accidently removed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170024 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agounHECKify test fixed by Jacob in r159003.
Jakub Staszak [Wed, 12 Dec 2012 20:58:42 +0000 (20:58 +0000)]
unHECKify test fixed by Jacob in r159003.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170023 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove trailing whitespace
Michael Ilseman [Wed, 12 Dec 2012 20:57:53 +0000 (20:57 +0000)]
Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170022 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix the build on case sensitive file systems.
Benjamin Kramer [Wed, 12 Dec 2012 20:55:44 +0000 (20:55 +0000)]
Fix the build on case sensitive file systems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170021 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplify negated bit test
David Majnemer [Wed, 12 Dec 2012 20:48:54 +0000 (20:48 +0000)]
Simplify negated bit test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170020 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoInitial implementation of a utility for converting native data
Nick Kledzik [Wed, 12 Dec 2012 20:46:15 +0000 (20:46 +0000)]
Initial implementation of a utility for converting native data
structures to and from YAML using traits.  The first client will
be the test suite of lld.  The documentation will show up at:

   http://llvm.org/docs/YamlIO.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170019 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a logic bug in inline expansion of memcpy / memset with an overlapping
Evan Cheng [Wed, 12 Dec 2012 20:43:23 +0000 (20:43 +0000)]
Fix a logic bug in inline expansion of memcpy / memset with an overlapping
load / store pair. It's not legal to use a wider load than the size of
the remaining bytes if it's the first pair of load / store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170018 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agounHECKify test. It was fixed by Chris in 2009.
Jakub Staszak [Wed, 12 Dec 2012 20:43:00 +0000 (20:43 +0000)]
unHECKify test. It was fixed by Chris in 2009.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170017 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe ordering of two relocations on the same instruction is apparently not
Bill Schmidt [Wed, 12 Dec 2012 20:29:20 +0000 (20:29 +0000)]
The ordering of two relocations on the same instruction is apparently not
predictable when compiled on at least one non-PowerPC host.  Source of
nondeterminism not apparent.  Restrict the test to build on PowerPC hosts
for now while looking into the issue further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170016 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo in test-case.
Jakub Staszak [Wed, 12 Dec 2012 20:29:06 +0000 (20:29 +0000)]
Fix typo in test-case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170015 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Fix a memory leak bug report by NAKAMURA Takumi.
Akira Hatanaka [Wed, 12 Dec 2012 20:09:58 +0000 (20:09 +0000)]
[mips] Fix a memory leak bug report by NAKAMURA Takumi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170012 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: SphinxQuickstartTemplate.rst: add guidelines about highlighting
Dmitri Gribenko [Wed, 12 Dec 2012 20:07:18 +0000 (20:07 +0000)]
Documentation: SphinxQuickstartTemplate.rst: add guidelines about highlighting
console sessions and add more highlighter names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170011 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake naming consistent, add comments and sanity asserts
Eli Bendersky [Wed, 12 Dec 2012 19:54:05 +0000 (19:54 +0000)]
Make naming consistent, add comments and sanity asserts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170007 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typo.
Jakub Staszak [Wed, 12 Dec 2012 19:47:04 +0000 (19:47 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170006 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix indentation.
Nadav Rotem [Wed, 12 Dec 2012 19:39:36 +0000 (19:39 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170005 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase...
Nadav Rotem [Wed, 12 Dec 2012 19:29:45 +0000 (19:29 +0000)]
LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170004 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis patch implements local-dynamic TLS model support for the 64-bit
Bill Schmidt [Wed, 12 Dec 2012 19:29:35 +0000 (19:29 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170003 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoKerning.
Bill Wendling [Wed, 12 Dec 2012 19:21:53 +0000 (19:21 +0000)]
Kerning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170002 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: llvm-bcanalyzer.rst: cleanup.
Dmitri Gribenko [Wed, 12 Dec 2012 19:15:53 +0000 (19:15 +0000)]
Documentation: llvm-bcanalyzer.rst: cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170001 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: AliasAnalysis.rst: improve internal and external links
Dmitri Gribenko [Wed, 12 Dec 2012 17:03:50 +0000 (17:03 +0000)]
Documentation: AliasAnalysis.rst: improve internal and external links

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169993 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: convert WritingAnLLVMPass.html to reST.
Dmitri Gribenko [Wed, 12 Dec 2012 17:02:44 +0000 (17:02 +0000)]
Documentation: convert WritingAnLLVMPass.html to reST.

Patch by Anthony Mykhailenko with small fixes by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169992 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: cleanup
Dmitri Gribenko [Wed, 12 Dec 2012 16:58:13 +0000 (16:58 +0000)]
Documentation: cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169990 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe TargetData is not used for the isPowerOfTwo determination. It has never
Rafael Espindola [Wed, 12 Dec 2012 16:52:40 +0000 (16:52 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169988 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoImprove debug info generated with enabled AddressSanitizer.
Alexey Samsonov [Wed, 12 Dec 2012 14:31:53 +0000 (14:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169984 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: use a 'console' highlighter for terminal output examples. This
Dmitri Gribenko [Wed, 12 Dec 2012 14:23:14 +0000 (14:23 +0000)]
Documentation: use a 'console' highlighter for terminal output examples.  This
gives a nicer output than 'bash'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169981 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: use a 'console' highlighter for terminal output examples. This
Dmitri Gribenko [Wed, 12 Dec 2012 13:56:37 +0000 (13:56 +0000)]
Documentation: use a 'console' highlighter for terminal output examples.  This
gives a nicer output than 'bash'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169979 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK...
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:20 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK-NOT lines.

Found by Alexander Zinenko, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169978 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test...
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:14 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test/g, not to mismatch "CHECK(-NOT): test".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169977 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd ARM NONE and PREL31 relocation types.
Logan Chien [Wed, 12 Dec 2012 07:14:46 +0000 (07:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169965 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove some dead code.
Rafael Espindola [Wed, 12 Dec 2012 06:18:15 +0000 (06:18 +0000)]
Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169963 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[CMake] Fixup R600.
NAKAMURA Takumi [Wed, 12 Dec 2012 03:34:26 +0000 (03:34 +0000)]
[CMake] Fixup R600.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169962 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSorry about the churn. One more change to getOptimalMemOpType() hook. Did I
Evan Cheng [Wed, 12 Dec 2012 02:34:41 +0000 (02:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169959 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/
NAKAMURA Takumi [Wed, 12 Dec 2012 01:41:01 +0000 (01:41 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169957 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.
NAKAMURA Takumi [Wed, 12 Dec 2012 01:40:56 +0000 (01:40 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169956 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix the ascii drawing that was ruined when I split the H and CPP
Nadav Rotem [Wed, 12 Dec 2012 01:33:47 +0000 (01:33 +0000)]
Fix the ascii drawing that was ruined when I split the H and CPP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169955 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago- Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Evan Cheng [Wed, 12 Dec 2012 01:32:07 +0000 (01:32 +0000)]
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169954 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agofix a typo.
Nadav Rotem [Wed, 12 Dec 2012 01:31:10 +0000 (01:31 +0000)]
fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169953 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion
Manman Ren [Wed, 12 Dec 2012 01:13:50 +0000 (01:13 +0000)]
DAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion

rdar://12838504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169951 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop...
Nadav Rotem [Wed, 12 Dec 2012 01:11:46 +0000 (01:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169950 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAvoid using lossy load / stores for memcpy / memset expansion. e.g.
Evan Cheng [Wed, 12 Dec 2012 00:42:09 +0000 (00:42 +0000)]
Avoid using lossy load / stores for memcpy / memset expansion. e.g.
f64 load / store on non-SSE2 x86 targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169944 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHave SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
Michael Ilseman [Wed, 12 Dec 2012 00:29:16 +0000 (00:29 +0000)]
Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169943 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago- Fix a problematic way in creating all-the-1 APInt.
Shuxin Yang [Wed, 12 Dec 2012 00:29:03 +0000 (00:29 +0000)]
- Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169942 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove redunant optimizations from InstCombine, instead call the appropriate function...
Michael Ilseman [Wed, 12 Dec 2012 00:28:32 +0000 (00:28 +0000)]
Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169941 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdded a slew of SimplifyInstruction floating-point optimizations, many of which take...
Michael Ilseman [Wed, 12 Dec 2012 00:27:46 +0000 (00:27 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169940 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPattern matchers for floating point values
Michael Ilseman [Wed, 12 Dec 2012 00:23:43 +0000 (00:23 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169939 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove FIXMEs surrounding Constant[Data]Vectors, instead
Michael Ilseman [Wed, 12 Dec 2012 00:21:43 +0000 (00:21 +0000)]
Remove FIXMEs surrounding Constant[Data]Vectors, instead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169938 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTrim unneeded header #include.
Jim Grosbach [Tue, 11 Dec 2012 23:39:51 +0000 (23:39 +0000)]
Trim unneeded header #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169933 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: cleanup: remove useless anchors and write :ref:s explicitly.
Dmitri Gribenko [Tue, 11 Dec 2012 23:35:23 +0000 (23:35 +0000)]
Documentation: cleanup: remove useless anchors and write :ref:s explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169932 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: Remove old testing option.
Jim Grosbach [Tue, 11 Dec 2012 23:31:12 +0000 (23:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169931 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoARM: Remove old testing options.
Jim Grosbach [Tue, 11 Dec 2012 23:31:10 +0000 (23:31 +0000)]
ARM: Remove old testing options.

Base pointer referencing has been enabled for ages.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169930 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReplace TargetLowering::isIntImmLegal() with
Evan Cheng [Tue, 11 Dec 2012 23:26:14 +0000 (23:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169929 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: Lexicon.rst: add 'SLP' acronym
Dmitri Gribenko [Tue, 11 Dec 2012 23:13:23 +0000 (23:13 +0000)]
Documentation: Lexicon.rst: add 'SLP' acronym

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169928 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR14574. Fix a bug in the code that calculates the mask the converted PHIs in if...
Nadav Rotem [Tue, 11 Dec 2012 21:30:14 +0000 (21:30 +0000)]
PR14574. Fix a bug in the code that calculates the mask the converted PHIs in if-conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169916 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd R600 backend
Tom Stellard [Tue, 11 Dec 2012 21:25:42 +0000 (21:25 +0000)]
Add R600 backend

A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169915 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis patch implements the general dynamic TLS model for 64-bit PowerPC.
Bill Schmidt [Tue, 11 Dec 2012 20:30:11 +0000 (20:30 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169910 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdate some comments.
Eric Christopher [Tue, 11 Dec 2012 19:42:09 +0000 (19:42 +0000)]
Update some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169907 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLoop Vectorize: optimize the vectorization of trunc(induction_var). The truncation...
Nadav Rotem [Tue, 11 Dec 2012 18:58:10 +0000 (18:58 +0000)]
Loop Vectorize: optimize the vectorization of trunc(induction_var). The truncation is now done on scalars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169904 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,
Eli Bendersky [Tue, 11 Dec 2012 17:16:00 +0000 (17:16 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169886 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse an ArrayRef instead of a std::vector&.
Rafael Espindola [Tue, 11 Dec 2012 16:36:02 +0000 (16:36 +0000)]
Use an ArrayRef instead of a std::vector&.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169881 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd comment for load folding
Joel Jones [Tue, 11 Dec 2012 16:10:25 +0000 (16:10 +0000)]
Add comment for load folding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169880 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: convert Passes.html to reST.
Dmitri Gribenko [Tue, 11 Dec 2012 15:29:37 +0000 (15:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169867 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/TableGen: Remove XFAIL:vg_leak in dozen of tests, according to llvm-x86_64...
NAKAMURA Takumi [Tue, 11 Dec 2012 13:14:16 +0000 (13:14 +0000)]
llvm/test/TableGen: Remove XFAIL:vg_leak in dozen of tests, according to llvm-x86_64-linux-vg_leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169862 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Use explicitely aligned stores and loads with function argument shadow.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:34:09 +0000 (12:34 +0000)]
[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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169859 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert EVT->MVT changes, r169836-169851, due to buildbot failures.
Patrik Hagglund [Tue, 11 Dec 2012 11:14:33 +0000 (11:14 +0000)]
Revert EVT->MVT changes, r169836-169851, due to buildbot failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169854 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHolding my nose and moving the accumulation routine to GEPOperator
Chandler Carruth [Tue, 11 Dec 2012 11:05:15 +0000 (11:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169853 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHoist the GEP constant address offset computation to a common home on
Chandler Carruth [Tue, 11 Dec 2012 10:29:10 +0000 (10:29 +0000)]
Hoist the GEP constant address offset computation to a common home on
the GEP instruction class.

This is part of the continued refactoring and cleaning of the
infrastructure used by SROA. This particular operation is also done in
a few other places which I'll try to refactor to share this
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169852 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange RegVT in BitTestBlock and RegsForValue, to contain MVTs,
Patrik Hagglund [Tue, 11 Dec 2012 10:24:48 +0000 (10:24 +0000)]
Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169851 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getTypeForExtArgOrReturn to take and return
Patrik Hagglund [Tue, 11 Dec 2012 10:20:51 +0000 (10:20 +0000)]
Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.

Accordingly, add bitsLT (and similar) to MVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169850 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
Patrik Hagglund [Tue, 11 Dec 2012 10:16:19 +0000 (10:16 +0000)]
Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169849 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::RegisterTypeForVT to contain MVTs, instead of
Patrik Hagglund [Tue, 11 Dec 2012 10:09:23 +0000 (10:09 +0000)]
Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169848 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::TransformToType to contain MVTs, instead of
Patrik Hagglund [Tue, 11 Dec 2012 10:05:04 +0000 (10:05 +0000)]
Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169847 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
Patrik Hagglund [Tue, 11 Dec 2012 10:00:35 +0000 (10:00 +0000)]
Change TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
getIndexedStoreAction, and addRegisterClass to take an MVT, instead
of EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169846 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::findRepresentativeClass to take an MVT, instead
Patrik Hagglund [Tue, 11 Dec 2012 09:57:18 +0000 (09:57 +0000)]
Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169845 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getTypeToPromoteTo to take and return MVTs,
Patrik Hagglund [Tue, 11 Dec 2012 09:54:23 +0000 (09:54 +0000)]
Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169844 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:51:27 +0000 (09:51 +0000)]
Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169843 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getCondCodeAction to take an MVT, instead of
Patrik Hagglund [Tue, 11 Dec 2012 09:48:14 +0000 (09:48 +0000)]
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169842 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.
Patrik Hagglund [Tue, 11 Dec 2012 09:42:24 +0000 (09:42 +0000)]
Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169841 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getLoadExtAction to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:39:09 +0000 (09:39 +0000)]
Change TargetLowering::getLoadExtAction to take an MVT, instead of EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169840 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::setTypeAction to take an MVT, instead fo EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:32:56 +0000 (09:32 +0000)]
Change TargetLowering::setTypeAction to take an MVT, instead fo EVT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169839 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getRepRegClassFor to take an MVT, instead of
Patrik Hagglund [Tue, 11 Dec 2012 09:31:43 +0000 (09:31 +0000)]
Change TargetLowering::getRepRegClassFor to take an MVT, instead of
EVT.

Accordingly, change RegDefIter to contain MVTs instead of EVTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169838 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange TargetLowering::getRegClassFor to take an MVT, instead of EVT.
Patrik Hagglund [Tue, 11 Dec 2012 09:10:33 +0000 (09:10 +0000)]
Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.

Accordingly, add helper funtions getSimpleValueType (in parallel to
getValueType) in SDValue, SDNode, and TargetLowering.

This is the first, in a series of patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169837 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agorevert the test change
Hao Liu [Tue, 11 Dec 2012 06:25:18 +0000 (06:25 +0000)]
revert the test change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169823 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoA newbie try a test commit
Hao Liu [Tue, 11 Dec 2012 06:22:54 +0000 (06:22 +0000)]
A newbie try a test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169821 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[CMake] Remove dependencies to intrinsics_gen I introduced in r169724.
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:54 +0000 (05:53 +0000)]
[CMake] Remove dependencies to intrinsics_gen I introduced in r169724.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169819 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/Target/TargetMachine.h: Remove two dependent headers.
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:43 +0000 (05:53 +0000)]
llvm/Target/TargetMachine.h: Remove two dependent headers.

-#include "llvm/Target/TargetTransformImpl.h"
-#include "llvm/TargetTransformInfo.h"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169818 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/tools: Add #include "llvm/TargetTransformInfo.h"
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:37 +0000 (05:53 +0000)]
llvm/tools: Add #include "llvm/TargetTransformInfo.h"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169817 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse multiclass for new-value store instructions with MEMri operand.
Jyotsna Verma [Tue, 11 Dec 2012 05:12:25 +0000 (05:12 +0000)]
Use multiclass for new-value store instructions with MEMri operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169814 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix PR14565. Don't if-convert loops that have switch statements in them.
Nadav Rotem [Tue, 11 Dec 2012 04:55:10 +0000 (04:55 +0000)]
Fix PR14565. Don't if-convert loops that have switch statements in them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169813 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange some functions to take const pointers.
Rafael Espindola [Tue, 11 Dec 2012 03:10:43 +0000 (03:10 +0000)]
Change some functions to take const pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169812 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoStylistic tweak.
Evan Cheng [Tue, 11 Dec 2012 02:31:57 +0000 (02:31 +0000)]
Stylistic tweak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169811 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a triple to this test.
Chad Rosier [Tue, 11 Dec 2012 00:51:36 +0000 (00:51 +0000)]
Add a triple to this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169803 91177308-0d34-0410-b5e6-96231b3b80d8