Commit Graph

119753 Commits

Author SHA1 Message Date
Kostya Serebryany ba41e8d2c5 [asan]: fix mac build
llvm-svn: 147792
2012-01-09 19:35:11 +00:00
Akira Hatanaka 1632af603d Insert padding before unaligned long double arguments.
llvm-svn: 147791
2012-01-09 19:31:25 +00:00
Greg Clayton 01a82d1918 Fixed a return value problem with the new ABI::FixCodeAddress () function:
it was checked in as:
 virtual bool ABI::FixCodeAddress (lldb::addr_t pc);

when it should have been:

virtual lldb::addr_t ABI::FixCodeAddress (lldb::addr_t pc);


 

llvm-svn: 147790
2012-01-09 19:23:34 +00:00
Johnny Chen c2a64b9b90 Fix comment.
llvm-svn: 147789
2012-01-09 19:19:23 +00:00
Kostya Serebryany 5be458ccfd [asan] refactoring: move some common linux/mac code to asan_posix.cc
llvm-svn: 147788
2012-01-09 19:18:27 +00:00
Devang Patel 85d684a4d9 Split AsmParser into two components - AsmParser and AsmParserVariant
AsmParser holds info specific to target parser.
AsmParserVariant holds info specific to asm variants supported by the target.

llvm-svn: 147787
2012-01-09 19:13:28 +00:00
Akira Hatanaka 18334dd9e9 Move the piece of code up that skips the padding argument. Without this change,
padding insertion will not work if the coerced type is not a structure.

llvm-svn: 147786
2012-01-09 19:08:06 +00:00
Andrew Trick 4dc3eff5ae "Minor LSR debugging stuff"
llvm-svn: 147785
2012-01-09 18:58:16 +00:00
Kostya Serebryany 9fd01e5ea5 [asan] refactoring: move all interceptors to a single file
llvm-svn: 147784
2012-01-09 18:53:15 +00:00
Richard Smith 12ea3c56c3 Restore some parts of this test which were accidental reverted in r147649.
Thanks to David Blaikie for pointing this out.

llvm-svn: 147783
2012-01-09 18:30:34 +00:00
Douglas Gregor 540fd8135e When deserializing an anonymous namespace from a module, do not attach
the anonymous namespace to its parent. Semantically, this means that
the anonymous namespaces defined in one module are distinct from the
anonymous namespaces defined in another module.

llvm-svn: 147782
2012-01-09 18:07:24 +00:00
Devang Patel fa8df4837a Update language check. Do not ignore DW_LANG_Python.
Patch by  Joe Groff!

llvm-svn: 147781
2012-01-09 17:49:47 +00:00
Douglas Gregor 9b47f94133 Implement merging of namespace-scope declarations across modules, so
that we can merge, for example, two occurrences of

  namespace N { void f(); }

in two disjoint modules.

llvm-svn: 147780
2012-01-09 17:38:47 +00:00
Benjamin Kramer f7fe24f40a Move assert to the right place.
llvm-svn: 147779
2012-01-09 17:36:29 +00:00
Douglas Gregor cfe7dc6b2f Implement redeclaration merging for namespaces defined in distinct
modules. Teach name lookup into namespaces to search in each of the
merged DeclContexts as well as the (now-primary) DeclContext. This
supports the common case where two different modules put something
into the same namespace.

llvm-svn: 147778
2012-01-09 17:30:44 +00:00
Benjamin Kramer f9d0cc0160 InstCombine: Teach foldLogOpOfMaskedICmpsHelper that sign bit tests are bit tests.
This subsumes several other transforms while enabling us to catch more cases.

llvm-svn: 147777
2012-01-09 17:23:27 +00:00
Howard Hinnant d88ba82a47 Getting a start on the typeinfo infrastructure.
llvm-svn: 147776
2012-01-09 17:10:00 +00:00
Douglas Gregor dbd93bfc2d Always allow redefinition of typedefs when modules are enabled. This
is important because it's fairly common for headers (especially system
headers) to want to provide only those typedefs needed for that
particular header, based on some guard macro, e.g.,

#ifndef _SIZE_T
#define _SIZE_T
typedef long size_t;
#endif

which is repeated in a number of headers. The guard macro protects
against duplicate definitions. However, this means that only the first
occurrence of this pattern actually defines size_t, so the submodule
corresponding to this header has the only visible definition. If a
user then imports a different submodule from the same module, size_t
will be known but not visible, and therefore cannot be used.

By allowing redefinition of typedefs, each header that wants to define
size_t can do so independently, so it will be available in the
corresponding submodules.

llvm-svn: 147775
2012-01-09 15:36:04 +00:00
Abramo Bagnara 3732fa5417 Made unknown builtin diagnostic remappable.
llvm-svn: 147774
2012-01-09 10:05:48 +00:00
Chandler Carruth c16622daff Don't rely on the fact that shift values are never very large, and thus
this substraction will result in small negative numbers at worst which
become very large positive numbers on assignment and are thus caught by
the <=4 check on the next line. The >0 check clearly intended to catch
these as negative numbers.

Spotted by inspection, and impossible to trigger given the shift widths
that can be used.

llvm-svn: 147773
2012-01-09 09:47:25 +00:00
Chandler Carruth ea27c16adc Cleanup and FileCheck-ize a test.
llvm-svn: 147772
2012-01-09 09:44:26 +00:00
Craig Topper 23b9219765 Merge AVX/AVX2 into the SSE level.
llvm-svn: 147771
2012-01-09 09:19:09 +00:00
Craig Topper f287a4509e Remove AVX hack in X86Subtarget. AVX/AVX2 are now treated as an SSE level. Predicate functions have been altered to maintain previous names and behavior.
llvm-svn: 147770
2012-01-09 09:02:13 +00:00
Craig Topper b89805c77d Add HasAVX predicate to some of the AVX patterns.
llvm-svn: 147769
2012-01-09 08:34:00 +00:00
Craig Topper a51f7f75c2 Reorder a bunch of patterns to put the AVX version first thus giving it priority over the SSE version. Another step towards trying to remove the AVX hack that disables SSE from X86Subtarget.
llvm-svn: 147768
2012-01-09 08:10:38 +00:00
Craig Topper ef7f5bf8c9 Clean up patterns for MOVNT*. Not sure why there were floating point types on MOVNTPS and MOVNTDQ. And v4i64 was completely missing.
llvm-svn: 147767
2012-01-09 06:52:46 +00:00
Craig Topper c1f5622ad3 Mark MOVNTI as being supported in SSE2 OR AVX mode. This instruction has no AVX equivalent so we should use the SSE version.
llvm-svn: 147766
2012-01-09 06:38:55 +00:00
Craig Topper a081644f8a Move SSE2 logical operations PAND/POR/PXOR/PANDN above SSE1 logical operations ANDPS/ORPS/XORPS/ANDNPS. This fixes a pattern ordering issue that meant that the SSE2 instructions could never be directly selected since the SSE1 patterns would always match first. This is largely moot with the ExeDepsFix pass, but I'm trying to audit for all such ordering issues.
llvm-svn: 147765
2012-01-09 05:07:01 +00:00
Craig Topper 210e4f81b3 Change some places that were checking for AVX OR SSE1/2 to use hasXMM/hasXMMInt instead. Also fix one place that checked SSE3, but accidentally excluded AVX to use hasSSE3orAVX. This is a step towards removing the AVX hack from the X86Subtarget.h
llvm-svn: 147764
2012-01-09 02:28:15 +00:00
Rafael Espindola f28213ca01 Don't print an unused label before .cfi_endproc.
llvm-svn: 147763
2012-01-09 00:17:29 +00:00
Craig Topper 744f6311d3 Don't disable MMX support when AVX is enabled. Fix predicates for MMX instructions that were added along with SSE instructions to check for AVX in addition to SSE level.
llvm-svn: 147762
2012-01-09 00:11:29 +00:00
Howard Hinnant 86b4dfac01 First brush with testing __gxx_personality_v0 reveals there is still a long way to go. But my understanding of what it is supposed to do continues to improve. I am currently contemplating whether I need to implement typeinfo before completing __gxx_personality_v0 in order to get matching catch handlers correct.
llvm-svn: 147761
2012-01-08 23:50:46 +00:00
Howard Hinnant 7530f19d03 Add a few TODO's and FIXME's. Making notes as I go along, but not slowing down to fix these yet. Just don't want anything to fall through the cracks.
llvm-svn: 147760
2012-01-08 23:40:41 +00:00
Howard Hinnant 5dc3179e5d Correct comment regarding members of __cxa_dependent_exception. Actually it is useful to disguise a __cxa_dependent_exception as a __cxa_exception by filling in most (not all) of these members at __cxa_dependent_exception construction time. That way most routines don't have to care which kind of exception they have.
llvm-svn: 147759
2012-01-08 23:39:14 +00:00
Craig Topper c1ab7afec8 Enable FISTTP* instructions when AVX is enabled.
llvm-svn: 147758
2012-01-08 23:04:21 +00:00
Peter Collingbourne 0d0ef78167 Update repository paths.
llvm-svn: 147757
2012-01-08 22:31:18 +00:00
Peter Collingbourne d5395fbf03 Initial commit.
llvm-svn: 147756
2012-01-08 22:09:58 +00:00
Peter Collingbourne 11faafe7dc Create libclc subdirectories.
llvm-svn: 147755
2012-01-08 22:07:24 +00:00
Benjamin Kramer 6609f741b9 Tweak my last commit to be less conservative about uses.
We still save an instruction when just the "and" part is replaced.
Also change the code to match comments more closely.

llvm-svn: 147753
2012-01-08 21:12:51 +00:00
Evan Cheng 4882e488f7 Don't forget to transfer implicit uses of return instruction.
llvm-svn: 147752
2012-01-08 20:41:16 +00:00
Evan Cheng 520730ff23 Avoid eraseing copies from a reserved register unless the definition can be
safely proven not to have been clobbered. No small test case possible.

llvm-svn: 147751
2012-01-08 19:52:28 +00:00
Fariborz Jahanian 1bed413c89 objc++: more atomic property api code for
c++ object properties. wip.

llvm-svn: 147750
2012-01-08 19:13:23 +00:00
Benjamin Kramer da37e15345 InstCombine: If we have a bit test and a sign test anded/ored together, merge the sign bit into the bit test.
This is common in bit field code, e.g. checking if the first or the last bit of a bit field is set.

llvm-svn: 147749
2012-01-08 18:32:24 +00:00
Victor Umansky 540651cf59 Reverted commit #147601 upon Evan's request.
llvm-svn: 147748
2012-01-08 17:20:33 +00:00
Greg Clayton 4abd6eaaa0 <rdar://problem/10645694>
Fixed an ARM backtracing issue where if the previous frame was a thumb
function and it was a tail call so that the current frame returned to
an address that would fall into the next function, we would use the
next function as the basis for how we unwound the previous frame's
registers and of course get things wrong. We now fix the PC code
address using the current ABI plug-in, and the ARM ABI plug-in has
been modified to correctly fix the code address. So when we do the
symbol context lookup, instead of taking an address like 0x1001 and
decrementing 1, and looking up the symbol context for a frame, we
now correctly fix 0x1001 to 0x1000, then decrement that by 1 to
get the correct symbol context.

I added a bunch more logging to "log enable lldb uwnind" to help
us in the future. We now log the PC, FP and SP (if they are available),
and we also dump the "active_row" that we find for unwinding a frame.

llvm-svn: 147747
2012-01-08 05:54:35 +00:00
Greg Clayton 6e527321b3 <rdar://problem/10660369>
Fixed the default ARM regiter set to be able to refer to "r7" as "fp" for the apple debugserver.

llvm-svn: 147746
2012-01-08 05:49:22 +00:00
Rafael Espindola 81a6274e7c Remove MCELFStreamer.h.
llvm-svn: 147745
2012-01-07 23:18:39 +00:00
Rafael Espindola 47dbcd1d39 Remove unused variable.
llvm-svn: 147744
2012-01-07 22:52:07 +00:00
Rafael Espindola 382412032c Don't print a label before .cfi_startproc when we don't need to. This makes
the produce assembly when using CFI just a bit more readable.

llvm-svn: 147743
2012-01-07 22:42:19 +00:00
Benjamin Kramer ecb9fa11a4 Make clever use of alignment and padding to shrink GlobalValue.
-8 bytes on x86_64, no change on x86.

llvm-svn: 147742
2012-01-07 21:17:16 +00:00