Commit Graph

123139 Commits

Author SHA1 Message Date
Evan Cheng 87c7b09d8d Some ARM implementaions, e.g. A-series, does return stack prediction. That is,
the processor keeps a return addresses stack (RAS) which stores the address
and the instruction execution state of the instruction after a function-call
type branch instruction.

Calling a "noreturn" function with normal call instructions (e.g. bl) can
corrupt RAS and causes 100% return misprediction so LLVM should use a
unconditional branch instead. i.e.
mov lr, pc
b _foo
The "mov lr, pc" is issued in order to get proper backtrace.

rdar://8979299

llvm-svn: 151623
2012-02-28 06:42:03 +00:00
Craig Topper ccd651cac8 Convert generated intrinsic attributes to use an array lookup as Chris suggested in PR11951.
llvm-svn: 151622
2012-02-28 06:32:00 +00:00
Pete Cooper 39b5255df4 Reverted r152620 - DSE: Shorten memset when a later store overwrites the start of it. There were all sorts of buildbot issues
llvm-svn: 151621
2012-02-28 05:06:24 +00:00
Pete Cooper f3862f91de DSE: Shorten memset when a later store overwrites the start of it
llvm-svn: 151620
2012-02-28 04:27:10 +00:00
Bill Wendling d48b7783e8 Oops...Don't commit the other stuff..
llvm-svn: 151618
2012-02-28 04:01:21 +00:00
Bill Wendling 73799f68d8 Modify comment to reflect the importance of this code.
llvm-svn: 151617
2012-02-28 03:47:09 +00:00
Eli Friedman 7dff8a68df Basic coverage test for conversion-to-block-pointer for lambda expressions.
llvm-svn: 151616
2012-02-28 03:32:48 +00:00
Akira Hatanaka b2b980e628 Add comments.
llvm-svn: 151615
2012-02-28 03:18:43 +00:00
Akira Hatanaka b8a8e0c262 Do not reserve $gp as a dedicated global base register if the target ABI is not O32.
llvm-svn: 151614
2012-02-28 03:17:38 +00:00
Anna Zaks 6ca4fd5b88 [analyzer] Leaks should be uniqued by the allocation point in the
closest function context (Keychain API).

llvm-svn: 151613
2012-02-28 03:07:06 +00:00
Charles Davis e56294dbc6 Strip extraneous information, if present, from the linker version string on
Mac OS X. Patch by Fabian Groffen, with a slight tweak by me.

llvm-svn: 151612
2012-02-28 02:55:41 +00:00
Akira Hatanaka 330d901ce3 Add support for floating point base register + offset register addressing mode
load and store instructions.

llvm-svn: 151611
2012-02-28 02:55:02 +00:00
Jakob Stoklund Olesen 4c5ad2b812 Handle regmasks in MachineCSE.
Don't attempt to extend physreg live ranges across calls.

<rdar://problem/10942095>

llvm-svn: 151610
2012-02-28 02:08:50 +00:00
Rafael Espindola 334eaeae8e Enable -Wcovered-switch-default as it matches the switch style used in llvm.
llvm-svn: 151609
2012-02-28 02:01:55 +00:00
Anna Zaks 06a77fc1b9 [analyzer] Fix Malloc False Positive (PR 12100)
When allocated buffer is passed to CF/NS..NoCopy functions, the
ownership is transfered unless the deallocator argument is set to
'kCFAllocatorNull'.

llvm-svn: 151608
2012-02-28 01:54:22 +00:00
Jakob Stoklund Olesen 16c4a972db Handle regmasks in the machine code verifier.
llvm-svn: 151607
2012-02-28 01:42:41 +00:00
Jason Molenda a962eab24f Add one more define for sdk==iphoneos.
llvm-svn: 151606
2012-02-28 01:42:10 +00:00
Han Ming Ong 8bd6a81b10 <rdar://problem/10942472>
Allows the debugger to put a more sensible prompt when debugging as root.

llvm-svn: 151605
2012-02-28 01:18:30 +00:00
Jakob Stoklund Olesen 92c15b2b2c Enable ARM base pointer when calling functions with large arguments.
When an outgoing call takes more than 2k of arguments on the stack, we
don't allocate that call frame in the prolog, but adjust the stack
pointer immediately before the call instead.

This causes problems with the emergency spill slot because PEI can't
track stack pointer adjustments on the second pass, and if the outgoing
arguments are too big, SP can't be used to reach the emergency spill
slot at all.

Work around these problems by ensuring there is a base or frame pointer
that can be used to access the emergency spill slot.

<rdar://problem/10917166>

llvm-svn: 151604
2012-02-28 01:15:01 +00:00
Eli Friedman ec75fec805 Implement IRGen for the retain-autorelease in the lambda conversion-to-block-pointer outside of ARC. Testcases coming up soon.
llvm-svn: 151603
2012-02-28 01:08:45 +00:00
Ted Kremenek 3bc5372fae [analyzer] teach analyzer about ObjC literals, thus trimming out a false positive with the malloc() checker involving
comparing literal addresses to nil.

Fixes <rdar://problem/10579586>

llvm-svn: 151602
2012-02-28 00:56:05 +00:00
Michael J. Spencer 8c4729fd44 [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.
Add -D option to llvm-nm to dump dynamic symbols.

Patch by David Meyer.

llvm-svn: 151600
2012-02-28 00:40:37 +00:00
Chad Rosier 248c29966c Fix 80-column violation.
llvm-svn: 151599
2012-02-28 00:23:01 +00:00
Hal Finkel c947412fae Allow llvm-stress to optionally generate the other floating-point types (half, ppcf128, mmx, etc.)
llvm-svn: 151596
2012-02-27 23:59:33 +00:00
Jim Grosbach 2e16624291 Re-enable the Darwin ARM integrated assembler.
All known nightly-test failures are fixed.

llvm-svn: 151595
2012-02-27 23:55:25 +00:00
Bill Wendling 2b3f61af18 Add back removed code. It still causes LLVM to miscompile. But not having it breaks other things.
llvm-svn: 151594
2012-02-27 23:48:30 +00:00
Johnny Chen 1387839a9f Add more test scenarios for 'memory read': one for a successful command execution
and one for another error message.

llvm-svn: 151593
2012-02-27 23:44:26 +00:00
Anna Zaks 43ffba2676 [analyzer] Leaks should be uniqued by the allocation point in the
closest function context. 

This prevents us from uniqueing all leaks from the same allocation
helper. radar://10932226

llvm-svn: 151592
2012-02-27 23:40:55 +00:00
Richard Trieu 9cd797aa3e Fix a test case that was added in r151570. The redirect of output was broken
so no testing was actually done.  Further, the commands produce no output.
The redirection has been fixed and the test has been disabled.

llvm-svn: 151591
2012-02-27 23:40:41 +00:00
Preston Gurd a49ef92a76 This patch adds instruction latencies for the SSE instructions
to the instruction scheduler for the Intel Atom.

llvm-svn: 151590
2012-02-27 23:35:03 +00:00
Ted Kremenek e0bce93e14 [analyzer] Don't generate an explicit ExplodedNode for StringLiterals; have the SVal lazily generated from Environment::getSVal().
llvm-svn: 151589
2012-02-27 23:34:19 +00:00
Preston Gurd 43b2506e32 test commit.
llvm-svn: 151588
2012-02-27 23:31:51 +00:00
Johnny Chen be66898cd5 Modify the expected error message accordingly after the recent change to DataExtractor.cpp.
llvm-svn: 151587
2012-02-27 23:27:16 +00:00
Sebastian Redl a235e2d8ad Hack in a loud error for PR12086. Better than a silent miscompile.
llvm-svn: 151586
2012-02-27 23:20:01 +00:00
Argyrios Kyrtzidis 465e137558 When evaluating integer expressions include a check for sub-expressions
depth and error if we exceed a max value, to make sure we avoid a stack overflow.

This is a hacky temporary fix. rdar://10913206.

llvm-svn: 151585
2012-02-27 23:18:37 +00:00
Eli Friedman 0774902a00 Duncan pointed out that if the alignment isn't explicitly specified, it defaults to the ABI alignment. Given that, make this code a bit more aggressive in such cases.
llvm-svn: 151584
2012-02-27 23:16:46 +00:00
Johnny Chen ac25713f60 During the test case tearDown(), give it one final blow to make sure the child process spawned by pexpect is terminated.
Fix the issue of many '(lldb)' zombie processes observed by Jim.

llvm-svn: 151583
2012-02-27 23:07:40 +00:00
Evandro Menezes cf95bb758c Delete incorrect reference to inexistent Hexagon architecture manuals.
llvm-svn: 151582
2012-02-27 23:00:52 +00:00
Greg Clayton 70a08d99c8 <rdar://problem/10017623>
Fixed an error where if we tried to format a ValueObject using a format
that was incorrect for a variable, then it would set ValueObject::m_error
to an error state and stop the value from being able to be updated. We now
leave m_error alone and only let the update value code change that. Any errors
in formatting will return a valid value as C string that contains an error 
string. This lets us then modify the format and redisplay without any issues.

llvm-svn: 151581
2012-02-27 23:00:14 +00:00
Bill Wendling 688793da4a Don't use #if 0. Just remove until I can address this.
llvm-svn: 151580
2012-02-27 22:55:40 +00:00
Ted Kremenek 59b10db2bc After numerous requests, have Objective-C 'method declared here' notes mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.
llvm-svn: 151579
2012-02-27 22:55:11 +00:00
Bill Wendling 06e4818dd6 XFAIL test until <rdar://problem/10913281> is fixed.
llvm-svn: 151578
2012-02-27 22:53:42 +00:00
Sebastian Redl aa6feaa7ea Implement a FIXME for conversion sequence distinction. Should fix PR12092.
llvm-svn: 151577
2012-02-27 22:38:26 +00:00
Bill Wendling 7b4646184b The code that cleans up multiple, isomorphic types has a subtle error that
manifests itself when building LLVM with LTO.
<rdar://problem/10913281>

llvm-svn: 151576
2012-02-27 22:34:19 +00:00
Michael J. Spencer 15a7b8e26a Remove duplicate copy of Object/ELF.h that somehow managed to get in.
Patch by David Meyer.

llvm-svn: 151575
2012-02-27 22:06:44 +00:00
Evan Cheng ddeb9d11fe Fix for PR12090: clear def maps of aliases when visiting a copy. e.g.
%S5<def> = COPY %S0<kill>
First clear def map of Q1, etc.

No small test case available.

llvm-svn: 151574
2012-02-27 21:46:42 +00:00
Ted Kremenek 205fbeb54a Fix documentation typo.
llvm-svn: 151573
2012-02-27 21:40:10 +00:00
Jim Grosbach 7b811d30d9 ARM BL/BLX instruction fixups should use relocations.
We on the linker to resolve calls to the appropriate BL/BLX instruction
to make interworking function correctly. It uses the symbol in the
relocation to do that, so we need to be careful about being too clever.

To enable this for ARM mode, split the BL/BLX fixup kind off from the
unconditional-branch fixups.

rdar://10927209

llvm-svn: 151571
2012-02-27 21:36:23 +00:00
Anna Zaks b028654031 [analyzer] Add -analyzer-stats, which hooks up LLVM stats tracking.
As in http://llvm.org/docs/ProgrammersManual.html#Statistic

llvm-svn: 151570
2012-02-27 21:33:16 +00:00
Eli Friedman 84e6e5cd1a Fix a couple bugs in the way we handle array indexes in array bounds checking. Specifically, make sure we don't ignore explicit casts in indexes, and make sure we use unsigned extension/comparisons on indexes. Fixes <rdar://problem/10916006>.
llvm-svn: 151569
2012-02-27 21:21:40 +00:00