Commit Graph

128572 Commits

Author SHA1 Message Date
Pete Cooper cd72016cab Move terminator machine verification to check MachineBasicBlock::instr_iterator instead of MBB::iterator
llvm-svn: 158154
2012-06-07 17:41:39 +00:00
Fariborz Jahanian bbc5bbf4f1 When emitting compund literal of vla pointer elements, make
sure to emit vla size to prevent an irgen crash.
// rdar://11485774

llvm-svn: 158153
2012-06-07 17:07:15 +00:00
Benjamin Kramer 5d4cff72b4 Reuse APInt's getNumWords, which gets rounding right (my ad-hoc solution missed it).
llvm-svn: 158151
2012-06-07 15:54:03 +00:00
Benjamin Kramer 6003ad5848 Plug a long standing memory leak in TemplateArgument.
The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.

Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.

llvm-svn: 158150
2012-06-07 15:09:51 +00:00
NAKAMURA Takumi 29aaccda13 test/Frontend/rewrite-includes.c: Tweak for win32's pathsep.
llvm-svn: 158149
2012-06-07 14:21:02 +00:00
Alexey Samsonov 91e1a7eb17 [Sanitizer] move internal_strdup and internal_memcpy to common runtime. Make internal allocations from TSan runtime call InternalAlloc from common runtime
llvm-svn: 158148
2012-06-07 11:54:08 +00:00
Alexey Samsonov 8b9aea522f [Sanitizer] use unsigned int as a parameter for placement new on 32 bits
llvm-svn: 158147
2012-06-07 10:09:41 +00:00
Benjamin Kramer b696a3639d Move sideeffecting call out of assert().
llvm-svn: 158146
2012-06-07 09:57:21 +00:00
Alexey Samsonov 8bd9098b32 [Sanitizer] move placement_new definiton from TSan to common runtime
llvm-svn: 158145
2012-06-07 09:50:16 +00:00
Alexey Samsonov 94e2b7d040 [Sanitizer] include stdlib.h header to get malloc/free
llvm-svn: 158144
2012-06-07 09:26:13 +00:00
Kostya Serebryany 0b14fd855b [asan] slow 16-byte redzones (still experimental)
llvm-svn: 158143
2012-06-07 09:15:48 +00:00
Alexey Samsonov 3a6ddb86e8 [Sanitizer] Allocator for internal runtime purposes. Currently it calls libcmalloc, but we might have to make it more low-level in future
llvm-svn: 158142
2012-06-07 08:52:56 +00:00
Alexey Samsonov cf4d3a027d [Sanitizer] Fix mac build.
llvm-svn: 158141
2012-06-07 07:32:00 +00:00
Alexey Samsonov 4b1f1031e6 [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.
llvm-svn: 158140
2012-06-07 07:13:46 +00:00
Alexey Samsonov 28a9895ee0 [Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.
llvm-svn: 158139
2012-06-07 06:15:12 +00:00
Alexey Samsonov fe44fbd750 [Sanitizer] Move ReadFileToBuffer to sanitizer_common.
llvm-svn: 158138
2012-06-07 05:38:26 +00:00
Pete Cooper f8d60d36c2 Add internal read flags to MachineInstrBuilder and hook them into the MachineOperand flag of the same name
llvm-svn: 158137
2012-06-07 04:43:52 +00:00
Anna Zaks 3563fde6a0 [analyzer] Anti-aliasing: different heap allocations do not alias
Add a concept of symbolic memory region belonging to heap memory space.
When comparing symbolic regions allocated on the heap, assume that they
do not alias. 

Use symbolic heap region to suppress a common false positive pattern in
the malloc checker, in code that relies on malloc not returning the
memory aliased to other malloc allocations, stack.

llvm-svn: 158136
2012-06-07 03:57:32 +00:00
Nick Kledzik 5fb2e4dabe put the public function createReaderPECOFF() in the lld namespace and everything else in is own namespace
llvm-svn: 158135
2012-06-07 02:23:48 +00:00
Nick Kledzik 98211f6d19 fix warnings found after cranking up warnings
llvm-svn: 158134
2012-06-07 01:53:39 +00:00
Nick Kledzik 40b8655082 abstract load commands to that WriterMachO can write 64-bit and 32-bit mach-o files
llvm-svn: 158133
2012-06-07 01:45:39 +00:00
Jordan Rose aefcedae65 Attach fixits for CFBridgingRetain/Release outside any casts.
Before, the note showed the location where you could insert __bridge variants,
but the actual fixit edit came after the cast.

No functionality change.

llvm-svn: 158131
2012-06-07 01:10:35 +00:00
Jordan Rose 288c421b3d Insert a space if necessary when suggesting CFBridgingRetain/Release.
This was a problem for people who write 'return(result);'

Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.

<rdar://problem/11577346>

llvm-svn: 158130
2012-06-07 01:10:31 +00:00
Meador Inge 161d5bb6f7 Adding a missing -S to the opt invocation.
llvm-svn: 158128
2012-06-07 01:02:13 +00:00
Argyrios Kyrtzidis b03cc793a9 [arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a +0 method,
automatically insert a __bridge cast.

radar://11560638

llvm-svn: 158127
2012-06-07 00:44:06 +00:00
Manman Ren ae02c5a93e X86: replace SUB with CMP if possible
This patch will optimize the following
    movq    %rdi, %rax
    subq    %rsi, %rax
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax
to
    cmpq    %rsi, %rdi
    cmovsq  %rsi, %rdi
    movq    %rdi, %rax

Perform this optimization if the actual result of SUB is not used.

rdar: 11540023
llvm-svn: 158126
2012-06-07 00:42:47 +00:00
Enrico Granata 79cc6f7a26 <rdar://problem/11538779> Fixing issues where Python scripts were not able to read user input and/or display output to the user in certain situations - This fix introduces a Python InputReader manager class that mimics the behavior of the interactive interpreter in terms of access to I/O and ensures access to the input and output flows
llvm-svn: 158124
2012-06-07 00:17:18 +00:00
Bill Wendling 3e8cf2be79 Spell optimization name correclty.
llvm-svn: 158123
2012-06-06 23:53:23 +00:00
Manman Ren 9c9641812c Revert r157755.
The commit is intended to fix rdar://11540023.
It is implemented as part of peephole optimization. We can actually implement
this in the SelectionDAG lowering phase.

llvm-svn: 158122
2012-06-06 23:53:03 +00:00
Bill Wendling 618547a9c6 Another testcase for r156548.
<rdar://problem/10889741>

llvm-svn: 158121
2012-06-06 23:36:22 +00:00
Michael J. Spencer 838e5add7e [llvm-nm] Update documentation to cover object file support and arguments.
llvm-svn: 158120
2012-06-06 23:34:10 +00:00
Fariborz Jahanian ff045dc040 reverse r158117.
llvm-svn: 158119
2012-06-06 23:21:58 +00:00
Fariborz Jahanian 67164852a7 When doing arithmatic on vla pointer, make sure
to emit vla size to prevent an irgen crash.
// rdar://11485774

llvm-svn: 158117
2012-06-06 22:58:50 +00:00
Jakob Stoklund Olesen 00e7dffefb Properly verify liveness with bundled machine instructions.
Bundles should be treated as one atomic transaction when checking
liveness. That is how the register allocator (and VLIW targets) treats
bundles.

llvm-svn: 158116
2012-06-06 22:34:30 +00:00
Argyrios Kyrtzidis 4e633b56c0 Fix test/SemaObjC/cocoa-api-usage.m that broke via r158114.
llvm-svn: 158115
2012-06-06 22:32:07 +00:00
Argyrios Kyrtzidis 63aebfb4ae [objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to literals,
since the change from +1 to +0 will be handled fine by ARC.

rdar://11606358

llvm-svn: 158114
2012-06-06 22:23:12 +00:00
Manuel Klimek 9cc3c0307d Puts the linktime dependencies into stupid-ld-required order, as proposed by Jordan Rose.
llvm-svn: 158113
2012-06-06 21:30:34 +00:00
Manuel Klimek 0a8b9cd1e7 Switches the RewriterTestContext away from PathV1.
Now the ToolingTests all work on Windows, and they also clean up their temporary directory if they don't crash.

llvm-svn: 158112
2012-06-06 21:28:13 +00:00
Douglas Gregor 91c25eadea Whenever we have a BalancedDelimiterTracker, we have a 'nested' scope
where '>' is going to behave as an operator (and not as a '>' closing
a template argument list).

llvm-svn: 158111
2012-06-06 21:18:07 +00:00
Kaelyn Uhrain 493ea635fe Allow CorrectTypo to add/modify nested name qualifiers to typos that
are otherwise too short to try to correct.

The TODOs added to two of the tests are for existing deficiencies in the
typo correction code that could be exposed by using longer identifiers.

llvm-svn: 158109
2012-06-06 20:54:51 +00:00
Sean Callanan d38b4a998e Added the --all argument to "target modules lookup"
that forces all matches to be looked up.  When --all
is not passed, and the current execution frame can
be used to narrow down the search, "target modules
lookup" will try searching in that specific frame
first.  Only if nothing is turned up there will it
go on to search all modules.

This feature is currently enabled only for types.

llvm-svn: 158107
2012-06-06 20:49:55 +00:00
Jordan Rose 0da4e77880 [analyzer] Provide debug descriptions for all memory space regions.
Patch by Guillem Marpons!

llvm-svn: 158106
2012-06-06 20:47:00 +00:00
Jordan Rose a929f2c863 Fix Makefile: Options.td depends on CC1Options.td.
llvm-svn: 158105
2012-06-06 20:46:55 +00:00
David Blaikie 40ed29730b Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

llvm-svn: 158104
2012-06-06 20:45:41 +00:00
Benjamin Kramer 3f87e3b707 Add accessors for all private members of DisasmContext.
LLVM should be -Wunused-private-field clean now.

llvm-svn: 158103
2012-06-06 20:45:10 +00:00
Andrew Trick 05ff4667eb Move RegisterClassInfo.h.
Allow targets to access this API. It's required for RegisterPressure.

llvm-svn: 158102
2012-06-06 20:29:31 +00:00
Benjamin Kramer c6e1894cc8 Remove dead private member variables from gtest.
llvm-svn: 158101
2012-06-06 20:23:00 +00:00
Benjamin Kramer 972a96aede Remove the last dead private member in clang.
llvm-svn: 158100
2012-06-06 20:15:08 +00:00
Andrew Trick 88517f608c Move RegisterPressure.h.
Make it a general utility for use by Targets.

llvm-svn: 158097
2012-06-06 19:47:35 +00:00
Benjamin Kramer 009b1c1cf1 Round 2 of dead private variable removal.
LLVM is now -Wunused-private-field clean except for
- lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields.
- gtest.

llvm-svn: 158096
2012-06-06 19:47:08 +00:00