Commit Graph

136017 Commits

Author SHA1 Message Date
Nadav Rotem 2289f2c932 Implement a basic VectorTargetTransformInfo interface to be used by the loop and bb vectorizers for modeling the cost of instructions.
llvm-svn: 166593
2012-10-24 17:22:41 +00:00
Chad Rosier 91c8266200 [ms-inline asm] Create a register operand, rather than a memory operand when we
see the offsetof operator.  Previously, we were matching something like MOVrm
in the front-end and later matching MOVrr in the back-end.  This change makes
things more consistent.  It also fixes cases where we can't match against a 
memory operand as the source (test cases coming).
Part of rdar://12470317

llvm-svn: 166592
2012-10-24 17:22:29 +00:00
Micah Villmow 6a8f3f9e20 Delete a directory that wasn't supposed to be checked in yet.
llvm-svn: 166591
2012-10-24 17:20:04 +00:00
Douglas Gregor e81699d938 Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.

llvm-svn: 166587
2012-10-24 17:01:35 +00:00
Douglas Gregor 2d30236d16 (De-)serialize header search options.
llvm-svn: 166586
2012-10-24 16:50:34 +00:00
Douglas Gregor 40ba1a0191 Update unit tests for HeaderSearch change
llvm-svn: 166584
2012-10-24 16:24:38 +00:00
Douglas Gregor b85b9ccb76 Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.

llvm-svn: 166583
2012-10-24 16:19:39 +00:00
Douglas Gregor 5a2783d522 Undef SEMANTIC_VALUE_DIAGOPT appropriately
llvm-svn: 166579
2012-10-24 15:53:39 +00:00
Micah Villmow 12d9127833 Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.

llvm-svn: 166578
2012-10-24 15:52:52 +00:00
Douglas Gregor c6317dbf5e (De-)serialize the file system options.
llvm-svn: 166577
2012-10-24 15:49:58 +00:00
Douglas Gregor 8263ffb268 Serialize DiagnosticOptions to the AST file.
llvm-svn: 166572
2012-10-24 15:17:15 +00:00
Mahesha S 3009374fa4 Removed an extra blank line.
llvm-svn: 166571
2012-10-24 15:12:40 +00:00
Manuel Klimek c268745011 Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.
llvm-svn: 166567
2012-10-24 14:47:44 +00:00
Elena Demikhovsky d6afb03bc9 Special calling conventions for Intel OpenCL built-in library.
llvm-svn: 166566
2012-10-24 14:46:16 +00:00
Douglas Gregor 2b0a568cdc Add a simple test involving decltype on Objective-C properties and ivars
llvm-svn: 166562
2012-10-24 14:13:21 +00:00
Douglas Gregor 47c089624f Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
llvm-svn: 166561
2012-10-24 14:11:55 +00:00
Evgeniy Stepanov 04dbc2d022 Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.
This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
  LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.

llvm-svn: 166560
2012-10-24 14:05:29 +00:00
Evgeniy Stepanov 64579da1a7 Build ASan runtime for ARM/Android.
llvm-svn: 166559
2012-10-24 14:03:41 +00:00
Alexey Samsonov 78d1210f38 Update docs about TSan availability in CMake build
llvm-svn: 166558
2012-10-24 13:34:53 +00:00
Alexey Samsonov 2e3c6e2e40 Fix some wordings in AddressSanitizer docs.
llvm-svn: 166557
2012-10-24 13:21:51 +00:00
NAKAMURA Takumi 701ddbcdeb [CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR.
llvm-svn: 166552
2012-10-24 12:26:08 +00:00
Ulrich Weigand 35668cc401 A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type.  This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.

This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.

llvm-svn: 166551
2012-10-24 12:22:56 +00:00
Alexander Potapenko 1eef2b813c [ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)

llvm-svn: 166550
2012-10-24 09:35:23 +00:00
Alexander Potapenko faa9c86fd0 [ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_inited != 0.
llvm-svn: 166549
2012-10-24 09:19:16 +00:00
Alexey Samsonov cea6239219 [ASan] Due to data races, ASan malloc stats are inaccurate, which may cause certain ASan interface functions returning negative values (casted to unsigned). Return a reasonable value if such a case is detected.
llvm-svn: 166548
2012-10-24 09:19:11 +00:00
Duncan Sands 72c19ed386 Add a testcase that would have noticed the typo fixed in commit 166475.
llvm-svn: 166547
2012-10-24 07:17:20 +00:00
Michael Liao 5922979e49 Teach DAG combine to fold (buildvec (Xint2fp x)) to (Xint2fp (buildvec x))
- If more than 1 elemennts are defined and target supports the vectorized
  conversion, use the vectorized one instead to reduce the strength on
  conversion operation.

llvm-svn: 166546
2012-10-24 04:14:18 +00:00
Michael Liao c5af149e70 Add custom conversion from v2u32 to v2f32 in 32-bit mode
- As there's no 64-bit GPRs in 32-bit mode, a custom conversion from v2u32 to
  v2f32 is added to improve the efficiency of the code generated.

llvm-svn: 166545
2012-10-24 04:09:32 +00:00
NAKAMURA Takumi f1f6e99c53 Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."
According to r166543, it is not needed for now.

llvm-svn: 166544
2012-10-24 03:59:09 +00:00
Nadav Rotem dc06b2d39d Clang now attempts to create a TargetMachine whenever a triple is given.
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.

llvm-svn: 166543
2012-10-24 03:52:31 +00:00
Jason Molenda 67c3cf5357 eArgTypePath was removed in r166533; change -c to
expect eArgTypeFilename.

llvm-svn: 166542
2012-10-24 03:29:40 +00:00
NAKAMURA Takumi a22fe582d2 clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
llvm-svn: 166541
2012-10-24 02:57:57 +00:00
Nico Weber 2643452746 Add a test for -Warc-abi as requested by Fariborz.
llvm-svn: 166540
2012-10-24 02:37:03 +00:00
Akira Hatanaka 868b3a333b [mips] Make sure sret argument is returned in register V0.
llvm-svn: 166539
2012-10-24 02:10:54 +00:00
Rafael Espindola fad28de40c Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

llvm-svn: 166538
2012-10-24 01:59:00 +00:00
Rafael Espindola 077dd59371 Add inreg markers with the x86_fastcallcc calling convention.
llvm-svn: 166537
2012-10-24 01:58:58 +00:00
Rafael Espindola 4e6e537314 Change x86_fastcallcc to require inreg markers. This allows it to known
the difference from "int x" (which should go in registers and
"struct y {int x;}" (which should not).

Clang will be updated in the next patches.

llvm-svn: 166536
2012-10-24 01:58:48 +00:00
Enrico Granata 44818163ed <rdar://problem/12523238> Commit 3 of 3
Changed all relevant test cases to verify that MightHaveChildren() works correctly for objects of interest
Added a bunch of convenience methods for test cases to use: target(), process(), thread() and frame() which mimic the lldb.X convenience variables
As a bonus, edited the documentation on the website to describe the new method available for synthetic children providers writers to implement!

That's all folks!

llvm-svn: 166535
2012-10-24 01:23:57 +00:00
Matt Beaumont-Gay 53e767bf6b Address feedback from Eli Friedman on r166522.
In particular, we do want to warn on some unused cast subexpressions within
macros.

llvm-svn: 166534
2012-10-24 01:14:28 +00:00
Sean Callanan 3154255fd6 This is a fix for the command option parser.
There was a generic catch-all type for path arguments
called "eArgTypePath," and a specialized version
called "eArgTypeFilename."  It turns out all the
cases where we used eArgTypePath we could have
used Filename or we explicitly meant a directory.

I changed Path to DirectoryName, made it use the
directory completer, and rationalized the uses of
Path.

<rdar://problem/12559915>

llvm-svn: 166533
2012-10-24 01:12:14 +00:00
Nadav Rotem ec57ab374b Change EmitAssemblyHelper to create the target machine early
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.

rdar://12464901

llvm-svn: 166532
2012-10-24 00:53:38 +00:00
Jakub Staszak a6addc2741 Keep coding standard. Don't evaluate getNumOperands() every time.
llvm-svn: 166531
2012-10-24 00:38:25 +00:00
Richard Smith 1f6f455f7c Fix ODR violations: a virtual function must be defined, even if it's never
called. Provide an (asserting) definition of Operator's private destructor.
Remove destructors from all classes derived from Operator. We don't need them
for safety, because their implicit definitions would be ill-formed (they'd call
Operator's private destructor), and we don't need them to avoid emitting
vtables, because we don't do anything with Operator subclasses which would
trigger vtable instantiation.

The Operator hierarchy is still a complete disaster with regard to undefined
behavior, but this at least allows LLVM to link when using Clang's
-fcatch-undefined-behavior with a new vptr-based type checking mechanism.

llvm-svn: 166530
2012-10-24 00:30:41 +00:00
Jordan Rose 1bbd143945 [analyzer] Handle 'SomeVar.SomeEnumConstant', which is legal in C++.
This caused assertion failures analyzing LLVM.

<rdar://problem/12560282>

llvm-svn: 166529
2012-10-23 23:59:08 +00:00
Jordan Rose 746c06d0bc [analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.
After every 1000 CFGElements processed, the ExplodedGraph trims out nodes
that satisfy a number of criteria for being "boring" (single predecessor,
single successor, and more). Rather than controlling this with a cc1 option,
which can only disable this behavior, we now have an analyzer-config option,
'graph-trim-interval', which can change this interval from 1000 to something
else. Setting the value to 0 disables reclamation.

The next commit relies on this behavior to actually test anything.

llvm-svn: 166528
2012-10-23 23:59:05 +00:00
Chad Rosier a96da4773c [ms-inline asm] Test case for r166526.
llvm-svn: 166527
2012-10-23 23:42:25 +00:00
Chad Rosier a623524487 [ms-inline asm] Offset operator - the size should be based on the size of a
pointer, not the size of the variable.
Part of rdar://12470317

llvm-svn: 166526
2012-10-23 23:42:06 +00:00
Chad Rosier eac2b2003e [ms-inline asm] Clean up comment.
llvm-svn: 166525
2012-10-23 23:34:28 +00:00
Chad Rosier 03c181b021 [ms-inline asm] Update the triple to test r166523.
llvm-svn: 166524
2012-10-23 23:32:21 +00:00
Chad Rosier 146310a1c1 [ms-inline asm] When parsing inline assembly we set the base register to a
non-zero value as we don't know the actual value at this point.  This is
necessary to get the matching correct in some cases.  However, the actual value
set as the base register doesn't matter, since we're just matching not emitting.

llvm-svn: 166523
2012-10-23 23:31:33 +00:00