Edwin Vane [Wed, 12 Dec 2012 14:30:57 +0000 (14:30 +0000)]
Initial commit for cpp11-migrate tool
- Added directory structures and build system files for the new tool.
- Extremely basic implementation of tool performs only an initial syntax check.
- Basic tests ensure syntax test works as expected.
llvm-svn: 169983
Kostya Serebryany [Wed, 12 Dec 2012 14:26:06 +0000 (14:26 +0000)]
[tsan] fix cmake build
llvm-svn: 169982
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'.
llvm-svn: 169981
Benjamin Kramer [Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)]
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code.
llvm-svn: 169980
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'.
llvm-svn: 169979
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!
llvm-svn: 169978
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".
llvm-svn: 169977
Manuel Klimek [Wed, 12 Dec 2012 13:26:54 +0000 (13:26 +0000)]
Speeds up parsing of global declarations in cases where the warning
is switched of by about 0.8% (tested with int i<N>).
Additionally, this puts computing the diagnostic class into the hot
path more when parsing, in preparation for upcoming optimizations
in this area.
llvm-svn: 169976
Dmitry Vyukov [Wed, 12 Dec 2012 13:11:44 +0000 (13:11 +0000)]
tsan: explain why pthread_cond_init() interceptor is commented out
llvm-svn: 169975
Alexander Potapenko [Wed, 12 Dec 2012 12:59:47 +0000 (12:59 +0000)]
[ASan] Enhance OOB tests to check for access type (read or write).
llvm-svn: 169974
Dmitry Vyukov [Wed, 12 Dec 2012 12:45:07 +0000 (12:45 +0000)]
tsan: add comment to tsan_fd.h file
llvm-svn: 169973
Alexander Potapenko [Wed, 12 Dec 2012 12:32:57 +0000 (12:32 +0000)]
[ASan] Fixed a compiler warning.
llvm-svn: 169972
Dmitry Vyukov [Wed, 12 Dec 2012 12:27:00 +0000 (12:27 +0000)]
tsan: add missing files
llvm-svn: 169971
Dmitry Vyukov [Wed, 12 Dec 2012 11:59:30 +0000 (11:59 +0000)]
tsan: more precise handling of IO synchronization
llvm-svn: 169970
Alexander Potapenko [Wed, 12 Dec 2012 11:52:26 +0000 (11:52 +0000)]
[ASan] fix compilation on Mac.
llvm-svn: 169969
Kostya Serebryany [Wed, 12 Dec 2012 11:37:23 +0000 (11:37 +0000)]
[asan] fix android build and lint
llvm-svn: 169968
Evgeniy Stepanov [Wed, 12 Dec 2012 10:50:48 +0000 (10:50 +0000)]
[msan] Remove an extra semicolon.
llvm-svn: 169967
Kostya Serebryany [Wed, 12 Dec 2012 09:54:35 +0000 (09:54 +0000)]
[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors
llvm-svn: 169966
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.
llvm-svn: 169965
NAKAMURA Takumi [Wed, 12 Dec 2012 06:22:22 +0000 (06:22 +0000)]
clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.
Thanks to Bogon Kim!
llvm-svn: 169964
Rafael Espindola [Wed, 12 Dec 2012 06:18:15 +0000 (06:18 +0000)]
Remove some dead code.
llvm-svn: 169963
NAKAMURA Takumi [Wed, 12 Dec 2012 03:34:26 +0000 (03:34 +0000)]
[CMake] Fixup R600.
llvm-svn: 169962
Enrico Granata [Wed, 12 Dec 2012 03:23:37 +0000 (03:23 +0000)]
Option changes:
the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command.
All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o)
This is a breaking change:
frame variable used --objc as the long option name
expression used -o as a shortcut
memory read uses --objd as the long option name
Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works
The test suite has been tweaked accordingly.
llvm-svn: 169961
Richard Smith [Wed, 12 Dec 2012 02:46:14 +0000 (02:46 +0000)]
Don't warn about disabled macro expansion if we see the name of a function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently.
llvm-svn: 169960
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.
llvm-svn: 169959
Jason Molenda [Wed, 12 Dec 2012 02:23:56 +0000 (02:23 +0000)]
Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.
llvm-svn: 169958
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/
llvm-svn: 169957
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.
llvm-svn: 169956
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
llvm-svn: 169955
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.
llvm-svn: 169954
Nadav Rotem [Wed, 12 Dec 2012 01:31:10 +0000 (01:31 +0000)]
fix a typo.
llvm-svn: 169953
Greg Clayton [Wed, 12 Dec 2012 01:15:30 +0000 (01:15 +0000)]
<rdar://problem/
12780507>
Fix add-dsym ("target symbols add") to correctly add a dSYM file when the target arch doesn't match the arch of the module.
llvm-svn: 169952
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
llvm-svn: 169951
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.
llvm-svn: 169950
Argyrios Kyrtzidis [Wed, 12 Dec 2012 01:05:25 +0000 (01:05 +0000)]
[libclang] Make sure tokens from preprocessor directives are annotated as such,
even if the directive is inside a declaration.
Fixes rdar://
11548788 & http://llvm.org/PR12970
llvm-svn: 169949
Richard Trieu [Wed, 12 Dec 2012 00:52:15 +0000 (00:52 +0000)]
Fix line ending is tests. No functional change.
llvm-svn: 169947
NAKAMURA Takumi [Wed, 12 Dec 2012 00:51:38 +0000 (00:51 +0000)]
clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.
"ansi-escape-sequences" is easy convenient to exclude win32. Please be patient.
llvm-svn: 169945
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.
llvm-svn: 169944
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
llvm-svn: 169943
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.
llvm-svn: 169942
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
llvm-svn: 169941
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
llvm-svn: 169940
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
llvm-svn: 169939
Michael Ilseman [Wed, 12 Dec 2012 00:21:43 +0000 (00:21 +0000)]
Remove FIXMEs surrounding Constant[Data]Vectors, instead
llvm-svn: 169938
Jim Grosbach [Tue, 11 Dec 2012 23:39:51 +0000 (23:39 +0000)]
Trim unneeded header #include.
llvm-svn: 169933
Dmitri Gribenko [Tue, 11 Dec 2012 23:35:23 +0000 (23:35 +0000)]
Documentation: cleanup: remove useless anchors and write :ref:s explicitly.
llvm-svn: 169932
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.
llvm-svn: 169931
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.
llvm-svn: 169930
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.
llvm-svn: 169929
Dmitri Gribenko [Tue, 11 Dec 2012 23:13:23 +0000 (23:13 +0000)]
Documentation: Lexicon.rst: add 'SLP' acronym
llvm-svn: 169928
Enrico Granata [Tue, 11 Dec 2012 22:42:19 +0000 (22:42 +0000)]
Adding a validation callback mechanism to OptionValueString (such a feature might theoretically be added to the general OptionValue base class should the need arise)
Using this mechanism, making sure that the options to pass a summary string or a named summary to frame variable do not have invalid values
<rdar://problem/
11576143>
llvm-svn: 169927
Sean Callanan [Tue, 11 Dec 2012 22:39:36 +0000 (22:39 +0000)]
Fixed the IRInterpreter's handling of "this" and
"self" when those pointers are in registers.
Previously in this case the IRInterpreter would
handle them just as if the user had typed in
"$rdi", which isn't safe because $rdi is passed
in through the argument struct.
Now we correctly break out all three cases (i.e.,
normal variables in registers, $reg, and this/self),
and handle them in a way that's a little bit easier
to read and change.
This results in more accurate printing of "this" and
"self" pointers all around. I have strengthened the
optimized-code test case for Objective-C to ensure
that we catch regressions in this area reliably in
the future.
<rdar://problem/
12693963>
llvm-svn: 169924
Douglas Gregor [Tue, 11 Dec 2012 22:31:46 +0000 (22:31 +0000)]
Try to fix Win32 failures
llvm-svn: 169923
Douglas Gregor [Tue, 11 Dec 2012 22:25:26 +0000 (22:25 +0000)]
Don't use 'touch' in this test; it may be the cause of Windows-related failures.
llvm-svn: 169922
Douglas Gregor [Tue, 11 Dec 2012 22:11:52 +0000 (22:11 +0000)]
Use @import rather than @__experimental_modules_import, since the
latter is rather a mess to type.
llvm-svn: 169919
Guy Benyei [Tue, 11 Dec 2012 21:38:14 +0000 (21:38 +0000)]
Add SPIR32/SPIR64 targets to Clang
llvm-svn: 169917
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.
llvm-svn: 169916
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
llvm-svn: 169915
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
llvm-svn: 169910
Hal Finkel [Tue, 11 Dec 2012 19:59:32 +0000 (19:59 +0000)]
Add -fslp-vectorize to enable bb-vectorize
Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility)
to provide a way to enable the basic-block vectorization pass. This uses the same
acronym as gcc, superword-level parallelism (SLP), also common in the literature,
to refer to basic-block vectorization.
Nadav suggested this as a follow-up to the adding of -fvectorize.
llvm-svn: 169909
Fariborz Jahanian [Tue, 11 Dec 2012 19:58:01 +0000 (19:58 +0000)]
objective-C blocks: Check for record type when deciding if
byref variable requires extended layout info. to prevent
a crash involving arrays declared __block. // rdar://
12787751
llvm-svn: 169908
Eric Christopher [Tue, 11 Dec 2012 19:42:09 +0000 (19:42 +0000)]
Update some comments.
llvm-svn: 169907
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.
llvm-svn: 169904
Douglas Gregor [Tue, 11 Dec 2012 18:53:07 +0000 (18:53 +0000)]
Don't complain about incomplete implementations for methods that are
unavailable due to availability attributes. <rdar://problem/
12798237>
llvm-svn: 169903
Benjamin Kramer [Tue, 11 Dec 2012 18:00:22 +0000 (18:00 +0000)]
Speed up looking up static diagnostic infos.
Instead of doing a binary search over the whole diagnostic table (which weighs
a whopping 48k on x86_64), use the existing enums to compute the index in the
table. This avoids loading any unneeded data from the table and avoids littering
CPU caches with it. This code is in a hot path for code with many diagnostics.
1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings.
llvm-svn: 169890
Chad Rosier [Tue, 11 Dec 2012 17:46:33 +0000 (17:46 +0000)]
[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
compatibility with gcc.
rdar://
12839978
llvm-svn: 169888
Matt Beaumont-Gay [Tue, 11 Dec 2012 17:37:46 +0000 (17:37 +0000)]
Fix a copypasto bug. Also rename the parameter in question to not shadow the
'file' builtin, and fix up a docstring a little.
Hat tip to Sebastian Kreft Carreno at Google for noticing the bug.
llvm-svn: 169887
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.
llvm-svn: 169886
Chad Rosier [Tue, 11 Dec 2012 17:12:28 +0000 (17:12 +0000)]
[driver] Add the -fvectorize flag to enable the loop vectorization passes.
rdar://
12839978
llvm-svn: 169885
Rafael Espindola [Tue, 11 Dec 2012 16:36:02 +0000 (16:36 +0000)]
Use an ArrayRef instead of a std::vector&.
llvm-svn: 169881
Joel Jones [Tue, 11 Dec 2012 16:10:25 +0000 (16:10 +0000)]
Add comment for load folding
llvm-svn: 169880
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.
llvm-svn: 169867
Alexander Kornienko [Tue, 11 Dec 2012 15:28:09 +0000 (15:28 +0000)]
StmtDumper coding style changes
Summary:
A few small coding style changes for StmtDumper, including:
- rename Dump* methods to dump*
- uninline some methods
- comment fixes
- whitespace fixes
Please review and commit if okay.
Reviewers: alexfh
Reviewed By: alexfh
CC: cfe-commits, alexfh, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D190
llvm-svn: 169866
Alexander Kornienko [Tue, 11 Dec 2012 15:20:44 +0000 (15:20 +0000)]
Rename StmtDumper::DumpSubTree() to dumpStmt()
Summary:
Also rename DumpDeclarator() to dumpDecl(). Once Decl dumping is added, these will be the two main methods of the class, so this is just for consistency in naming.
There was a DumpStmt() method already, but there was no point in having it, so I have merged it into VisitStmt(). Similarly, DumpExpr() is merged into VisitExpr().
Reviewers: alexfh
Reviewed By: alexfh
CC: cfe-commits, alexfh
Differential Revision: http://llvm-reviews.chandlerc.com/D156
llvm-svn: 169865
Kostya Serebryany [Tue, 11 Dec 2012 14:41:31 +0000 (14:41 +0000)]
[asan] more code for asan_allocator2: basic Allocate/Deallocate code
llvm-svn: 169864
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.
llvm-svn: 169862
Evgeniy Stepanov [Tue, 11 Dec 2012 12:52:38 +0000 (12:52 +0000)]
Add MemorySanitizer runtime to check_lint.sh.
llvm-svn: 169861
Evgeniy Stepanov [Tue, 11 Dec 2012 12:44:43 +0000 (12:44 +0000)]
[msan] Add a missing file from r169858.
llvm-svn: 169860
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).
llvm-svn: 169859
Evgeniy Stepanov [Tue, 11 Dec 2012 12:27:27 +0000 (12:27 +0000)]
[msan] MemorySanitizer runtime.
Initial commit of the MemorySanitizer runtime library.
llvm-svn: 169858
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:24:41 +0000 (12:24 +0000)]
ASan: fix lint problems introduced
llvm-svn: 169857
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:23:00 +0000 (12:23 +0000)]
Hopefully fix the Windows build (2)
llvm-svn: 169856
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:03:06 +0000 (12:03 +0000)]
Hopefully fix the Windows build by not including intrin.h
llvm-svn: 169855
Patrik Hagglund [Tue, 11 Dec 2012 11:14:33 +0000 (11:14 +0000)]
Revert EVT->MVT changes, r169836-169851, due to buildbot failures.
llvm-svn: 169854
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.
llvm-svn: 169853
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.
llvm-svn: 169852
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.
llvm-svn: 169851
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.
llvm-svn: 169850
Patrik Hagglund [Tue, 11 Dec 2012 10:16:19 +0000 (10:16 +0000)]
Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.
llvm-svn: 169849
Patrik Hagglund [Tue, 11 Dec 2012 10:09:23 +0000 (10:09 +0000)]
Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.
llvm-svn: 169848
Patrik Hagglund [Tue, 11 Dec 2012 10:05:04 +0000 (10:05 +0000)]
Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.
llvm-svn: 169847
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.
llvm-svn: 169846
Patrik Hagglund [Tue, 11 Dec 2012 09:57:18 +0000 (09:57 +0000)]
Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.
llvm-svn: 169845
Patrik Hagglund [Tue, 11 Dec 2012 09:54:23 +0000 (09:54 +0000)]
Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.
llvm-svn: 169844
Patrik Hagglund [Tue, 11 Dec 2012 09:51:27 +0000 (09:51 +0000)]
Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
llvm-svn: 169843
Patrik Hagglund [Tue, 11 Dec 2012 09:48:14 +0000 (09:48 +0000)]
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.
llvm-svn: 169842
Patrik Hagglund [Tue, 11 Dec 2012 09:42:24 +0000 (09:42 +0000)]
Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.
llvm-svn: 169841
Patrik Hagglund [Tue, 11 Dec 2012 09:39:09 +0000 (09:39 +0000)]
Change TargetLowering::getLoadExtAction to take an MVT, instead of EVT.
llvm-svn: 169840
Patrik Hagglund [Tue, 11 Dec 2012 09:32:56 +0000 (09:32 +0000)]
Change TargetLowering::setTypeAction to take an MVT, instead fo EVT.
llvm-svn: 169839
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.
llvm-svn: 169838