platform/upstream/llvm.git
11 years agoPR14581: Make SourceLocation::printToString work, or it will always return an empty...
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

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'.

llvm-svn: 169979

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!

llvm-svn: 169978

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".

llvm-svn: 169977

11 years agoSpeeds up parsing of global declarations in cases where the warning
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

11 years agotsan: explain why pthread_cond_init() interceptor is commented out
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

11 years ago[ASan] Enhance OOB tests to check for access type (read or write).
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

11 years agotsan: add comment to tsan_fd.h file
Dmitry Vyukov [Wed, 12 Dec 2012 12:45:07 +0000 (12:45 +0000)]
tsan: add comment to tsan_fd.h file

llvm-svn: 169973

11 years ago[ASan] Fixed a compiler warning.
Alexander Potapenko [Wed, 12 Dec 2012 12:32:57 +0000 (12:32 +0000)]
[ASan] Fixed a compiler warning.

llvm-svn: 169972

11 years agotsan: add missing files
Dmitry Vyukov [Wed, 12 Dec 2012 12:27:00 +0000 (12:27 +0000)]
tsan: add missing files

llvm-svn: 169971

11 years agotsan: more precise handling of IO synchronization
Dmitry Vyukov [Wed, 12 Dec 2012 11:59:30 +0000 (11:59 +0000)]
tsan: more precise handling of IO synchronization

llvm-svn: 169970

11 years ago[ASan] fix compilation on Mac.
Alexander Potapenko [Wed, 12 Dec 2012 11:52:26 +0000 (11:52 +0000)]
[ASan] fix compilation on Mac.

llvm-svn: 169969

11 years ago[asan] fix android build and lint
Kostya Serebryany [Wed, 12 Dec 2012 11:37:23 +0000 (11:37 +0000)]
[asan] fix android build and lint

llvm-svn: 169968

11 years ago[msan] Remove an extra semicolon.
Evgeniy Stepanov [Wed, 12 Dec 2012 10:50:48 +0000 (10:50 +0000)]
[msan] Remove an extra semicolon.

llvm-svn: 169967

11 years ago[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read...
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

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.

llvm-svn: 169965

11 years agoclang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparato...
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

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

llvm-svn: 169963

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

llvm-svn: 169962

11 years agoOption changes:
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

11 years agoDon't warn about disabled macro expansion if we see the name of a function-like macro...
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

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.

llvm-svn: 169959

11 years agoAdd a LOG_TARGET log to Target::SetDefaultArchitecture
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

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/

llvm-svn: 169957

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.

llvm-svn: 169956

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

llvm-svn: 169955

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.

llvm-svn: 169954

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

llvm-svn: 169953

11 years ago<rdar://problem/12780507>
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

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

llvm-svn: 169951

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.

llvm-svn: 169950

11 years ago[libclang] Make sure tokens from preprocessor directives are annotated as such,
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

11 years agoFix line ending is tests. No functional change.
Richard Trieu [Wed, 12 Dec 2012 00:52:15 +0000 (00:52 +0000)]
Fix line ending is tests.  No functional change.

llvm-svn: 169947

11 years agoclang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.
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

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.

llvm-svn: 169944

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

llvm-svn: 169943

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.

llvm-svn: 169942

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

llvm-svn: 169941

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

llvm-svn: 169940

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

llvm-svn: 169939

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

llvm-svn: 169938

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

llvm-svn: 169933

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.

llvm-svn: 169932

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.

llvm-svn: 169931

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.

llvm-svn: 169930

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.

llvm-svn: 169929

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

llvm-svn: 169928

11 years agoAdding a validation callback mechanism to OptionValueString (such a feature might...
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

11 years agoFixed the IRInterpreter's handling of "this" and
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

11 years agoTry to fix Win32 failures
Douglas Gregor [Tue, 11 Dec 2012 22:31:46 +0000 (22:31 +0000)]
Try to fix Win32 failures

llvm-svn: 169923

11 years agoDon't use 'touch' in this test; it may be the cause of Windows-related failures.
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

11 years agoUse @import rather than @__experimental_modules_import, since the
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

11 years agoAdd SPIR32/SPIR64 targets to Clang
Guy Benyei [Tue, 11 Dec 2012 21:38:14 +0000 (21:38 +0000)]
Add SPIR32/SPIR64 targets to Clang

llvm-svn: 169917

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.

llvm-svn: 169916

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

llvm-svn: 169915

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

llvm-svn: 169910

11 years agoAdd -fslp-vectorize to enable bb-vectorize
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

11 years agoobjective-C blocks: Check for record type when deciding if
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

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

llvm-svn: 169907

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.

llvm-svn: 169904

11 years agoDon't complain about incomplete implementations for methods that are
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

11 years agoSpeed up looking up static diagnostic infos.
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

11 years ago[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
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

11 years agoFix a copypasto bug. Also rename the parameter in question to not shadow the
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

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.

llvm-svn: 169886

11 years ago[driver] Add the -fvectorize flag to enable the loop vectorization passes.
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

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&.

llvm-svn: 169881

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

llvm-svn: 169880

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.

llvm-svn: 169867

11 years agoStmtDumper coding style changes
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

11 years agoRename StmtDumper::DumpSubTree() to dumpStmt()
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

11 years ago[asan] more code for asan_allocator2: basic Allocate/Deallocate code
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

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.

llvm-svn: 169862

11 years agoAdd MemorySanitizer runtime to check_lint.sh.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:52:38 +0000 (12:52 +0000)]
Add MemorySanitizer runtime to check_lint.sh.

llvm-svn: 169861

11 years ago[msan] Add a missing file from r169858.
Evgeniy Stepanov [Tue, 11 Dec 2012 12:44:43 +0000 (12:44 +0000)]
[msan] Add a missing file from r169858.

llvm-svn: 169860

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).

llvm-svn: 169859

11 years ago[msan] MemorySanitizer runtime.
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

11 years agoASan: fix lint problems introduced
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:24:41 +0000 (12:24 +0000)]
ASan: fix lint problems introduced

llvm-svn: 169857

11 years agoHopefully fix the Windows build (2)
Timur Iskhodzhanov [Tue, 11 Dec 2012 12:23:00 +0000 (12:23 +0000)]
Hopefully fix the Windows build (2)

llvm-svn: 169856

11 years agoHopefully fix the Windows build by not including intrin.h
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

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.

llvm-svn: 169854

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.

llvm-svn: 169853

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.

llvm-svn: 169852

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.

llvm-svn: 169851

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.

llvm-svn: 169850

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.

llvm-svn: 169849

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.

llvm-svn: 169848

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.

llvm-svn: 169847

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.

llvm-svn: 169846

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.

llvm-svn: 169845

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.

llvm-svn: 169844

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.

llvm-svn: 169843

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.

llvm-svn: 169842

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.

llvm-svn: 169841

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.

llvm-svn: 169840

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.

llvm-svn: 169839

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.

llvm-svn: 169838

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.

llvm-svn: 169837

11 years ago[asan] more sceleton code for asan_allocator2
Kostya Serebryany [Tue, 11 Dec 2012 09:02:36 +0000 (09:02 +0000)]
[asan] more sceleton code for asan_allocator2

llvm-svn: 169836

11 years agoExtend stat query APIs to explicitly specify if the query is for
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:23 +0000 (07:48 +0000)]
Extend stat query APIs to explicitly specify if the query is for
a file or directory, allowing just a stat call if a file descriptor
is not needed.

Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.

llvm-svn: 169831