Commit Graph

127964 Commits

Author SHA1 Message Date
Duncan Sands bddfb2f96b Make the reassociation pass more powerful so that it can handle expressions
with arbitrary topologies (previously it would give up when hitting a diamond
in the use graph for example).  The testcase from PR12764 is now reduced from
a pile of additions to the optimal 1617*%x0+208.  In doing this I changed the
previous strategy of dropping all uses for expression leaves to one of dropping
all but one use.  This works out more neatly (but required a bunch of tweaks)
and is also safer: some recently fixed bugs during recursive linearization were
because the linearization code thinks it completely owns a node if it has no uses
outside the expression it is linearizing.  But if the node was also in another
expression that had been linearized (and thus all uses of the node from that
expression dropped) then the conclusion that it is completely owned by the
expression currently being linearized is wrong.  Keeping one use from within each
linearized expression avoids this kind of mistake.

llvm-svn: 157467
2012-05-25 12:03:02 +00:00
Dmitry Vyukov 7339eb197b tsan: do not call into libc in symbolizer and in other code (this causes recursion and crashes)
llvm-svn: 157466
2012-05-25 11:15:04 +00:00
Dmitry Vyukov e86497ee1c tsan: output message about failure to intercept only if verbosity flag is passed
llvm-svn: 157465
2012-05-25 09:47:18 +00:00
Dmitry Vyukov ff25cf5887 asan: fix tests
depending on -m32/-m64 addr2line says either e.g. __xsan_strnlen or just strnlen

llvm-svn: 157464
2012-05-25 09:46:33 +00:00
Manuel Klimek 5d9e8362df Links the entry point to the tooling documentation into clang's menu bar.
llvm-svn: 157462
2012-05-25 08:39:21 +00:00
Richard Smith cff136cda8 Release notes update for -Wsometimes-uninitialized.
llvm-svn: 157459
2012-05-25 02:35:34 +00:00
Richard Smith 4323bf8e2e Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch
inevitably leads to an uninitialized variable use (so either the branch is dead
code or there is an uninitialized use bug).

This chunk of warnings tentatively lives within -Wuninitialized, in order to
give it more visibility to existing Clang users.

llvm-svn: 157458
2012-05-25 02:17:09 +00:00
Jason Molenda 6bfd821ad0 Bump to lldb 152.
llvm-svn: 157456
2012-05-25 02:05:58 +00:00
Andrew Trick 4e7f6a7702 misched: trace formatting
llvm-svn: 157455
2012-05-25 02:02:39 +00:00
Jason Molenda 6f5e8c2647 Add support for function with stack frame checks added by the compiler;
these functions will end in the sequence

  mov %rbp, %rsp
  ret
  call __stack_chk_fail

instead of the usual mov, ret.  The x86 assembly profiler only looked
for functions ending in 'ret' and added the Unwind row describing how to
set the CFA based on that -- the addition of the call insn (which is jumped
to earlier in the function body) threw off that inspection.

Resolves the need to "step" twice to get out of these functions when doing
source-level stepping.

<rdar://problem/11469705>

llvm-svn: 157454
2012-05-25 01:54:06 +00:00
Anna Zaks 268f154f48 [analyzer] Loading external plugins with scan-build
Load custom plugins when running scan-build. This is useful when
additional static analysis Checkers must be provided via clang's plugin
interface.

Loading additional plugins can now be done via the scan-build call:
scan-build -load-plugin <plugin.so>

A patch by Thomas Hauth.

llvm-svn: 157452
2012-05-25 01:13:50 +00:00
Bill Wendling 8e705852b7 Early-continue.Reducing indentation.
llvm-svn: 157451
2012-05-25 00:57:21 +00:00
Bill Wendling fec1fc3b85 Don't call exit from a runtime.
llvm-svn: 157450
2012-05-25 00:55:38 +00:00
Jakob Stoklund Olesen 49ea89ee2d Compress MCRegisterInfo register name tables.
Store (debugging) register names as offsets into a string table instead
of as char pointers.

llvm-svn: 157449
2012-05-25 00:21:41 +00:00
Eli Friedman 315a0c79f3 Simplify code for calling a function where CanLowerReturn fails, fixing a small bug in the process.
llvm-svn: 157446
2012-05-25 00:09:29 +00:00
Seth Cantrell 14340ca173 ensure value passed to is space is representable as unsigned char
if the value isn't an unsigned char or EOF behavior is undefined
(and on Windows there's an assertion)

llvm-svn: 157445
2012-05-25 00:03:29 +00:00
Richard Smith 3d31e8b280 Some cleanups around the uninitialized variables warning, and a FIXME. No functional change.
llvm-svn: 157440
2012-05-24 23:45:35 +00:00
Greg Clayton f1186de3f4 <rdar://problem/11529853>
Sending async packets can deadlock a program on darwin. We currently allow breakpoint packets and memory read/write packets (for software breakpoints) to be sent while a program is running. In the GDB remote plug-in, we will interrupt the run, send the async packet and resume (currently with the continue packet that caused the program to resume). If the GDB server supports the "vCont" packet, we might have initially continued with each thread stating it should continue. If new threads show up while we are stopped, which happend when running GCD, we can end up with new threads that we aren't mentioning in the continue list. So we start with a thread list of 1,2,3 and continue:

continue thread 1, continue thread 2, continue thread 3 

Now we interrupt and set a breakpoint and we actually have threads 1,2,3,4 now when we are about to resume, yet we send:

continue thread 1, continue thread 2, continue thread 3 

Any thread that isn't mentioned is currently going to stay suspended. This causes the deadlock.

llvm-svn: 157439
2012-05-24 23:42:14 +00:00
Kaelyn Uhrain 85d8f0cba8 Silence unused variable warnings from when assertions are disabled.
llvm-svn: 157438
2012-05-24 23:37:49 +00:00
Andrew Trick a306a8a844 misched: Use the same scheduling heuristics with -misched-topdown/bottomup.
(except the part about choosing direction)

llvm-svn: 157437
2012-05-24 23:11:17 +00:00
Fariborz Jahanian c37a1d6e0f cleanup some code.
llvm-svn: 157436
2012-05-24 22:59:56 +00:00
Fariborz Jahanian 3f88afad2f objective-c: warn on use of property setters
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://11528439, [PR12936].

llvm-svn: 157435
2012-05-24 22:48:38 +00:00
Eli Friedman c49c22642b Get rid of some non-ASCII en-dashes that crept in.
llvm-svn: 157434
2012-05-24 22:36:31 +00:00
Jakob Stoklund Olesen ff7fd4543f Shrink.
llvm-svn: 157433
2012-05-24 22:17:44 +00:00
Jakob Stoklund Olesen 36a5c8e550 Add support for range expressions in TableGen foreach loops.
Like this:

  foreach i = 0-127 in ...

Use braces for composite ranges:

  foreach i = {0-3,9-7} in ...

llvm-svn: 157432
2012-05-24 22:17:39 +00:00
Jakob Stoklund Olesen 74fd80e8fc Don't put TGParser scratch results in the output.
Only fully expanded Records should go into RecordKeeper.

llvm-svn: 157431
2012-05-24 22:17:36 +00:00
Jakob Stoklund Olesen 8a120b10bd Simplify TGParser::ProcessForEachDefs.
Use static type checking.

llvm-svn: 157430
2012-05-24 22:17:33 +00:00
Andrew Trick 79d3eecbb4 misched: Trace regpressure.
llvm-svn: 157429
2012-05-24 22:11:14 +00:00
Andrew Trick a8ad5f7c7b misched: Give each ReadyQ a unique ID
llvm-svn: 157428
2012-05-24 22:11:12 +00:00
Andrew Trick 61f1a278b8 misched: Added ScoreboardHazardRecognizer.
The Hazard checker implements in-order contraints, or interlocked
resources. Ready instructions with hazards do not enter the available
queue and are not visible to other heuristics.

The major code change is the addition of SchedBoundary to encapsulate
the state at the top or bottom of the schedule, including both a
pending and available queue.

The scheduler now counts cycles in sync with the hazard checker. These
are minimum cycle counts based on known hazards.

Targets with no itinerary (x86_64) currently remain at cycle 0. To fix
this, we need to provide some maximum issue width for all targets. We
also need to add the concept of expected latency vs. minimum latency.

llvm-svn: 157427
2012-05-24 22:11:09 +00:00
Andrew Trick ca47335461 misched: Release bottom roots in reverse order.
llvm-svn: 157426
2012-05-24 22:11:05 +00:00
Andrew Trick dd375dd34a misched: rename ReadyQ class
llvm-svn: 157425
2012-05-24 22:11:03 +00:00
Andrew Trick f378617773 misched: copy comments so compareRPDelta is readable by itself.
llvm-svn: 157424
2012-05-24 22:11:01 +00:00
Andrew Trick d5326aea81 regpressure: Added RegisterPressure::dump
llvm-svn: 157423
2012-05-24 22:10:59 +00:00
Andrew Trick b2c172e20a regpressure: physreg livein/out fix
llvm-svn: 157422
2012-05-24 22:10:57 +00:00
David Blaikie c575c80c3b Fix for CHECK-NOT misspelling.
Patch by Nicklas Bo Jensen.

llvm-svn: 157421
2012-05-24 22:08:29 +00:00
Eli Friedman f798f65ccc Implement the C++11 discarded value expression rules for volatile lvalues. <rdar://problem/10790820>.
llvm-svn: 157420
2012-05-24 22:04:19 +00:00
Justin Holewinski c05323dd5c Un-XFAIL CodeGen/builtins-nvptx.c now that the proper changes have
landed in LLVM core

llvm-svn: 157418
2012-05-24 21:39:33 +00:00
Justin Holewinski 907f7606f2 Remove the PTX back-end and all of its artifacts (triple, etc.)
This back-end was deprecated in favor of the NVPTX back-end.

NV_CONTRIB

llvm-svn: 157417
2012-05-24 21:38:21 +00:00
Owen Anderson 921082b883 Teach tblgen's set theory "sequence" operator to support an optional stride operand.
llvm-svn: 157416
2012-05-24 21:37:08 +00:00
Chad Rosier fd7469c947 Typo. Patch by Nicklas Bo Jensen <nbjensen@gmail.com>.
llvm-svn: 157415
2012-05-24 21:17:47 +00:00
Eli Friedman f92f6454ef A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where "x" refers to a local variable. This should silence a useless warning in compiler-rt and other places.
llvm-svn: 157414
2012-05-24 21:05:41 +00:00
John McCall d65dbd8e6a XFAIL this test, which does not pass on trunk since the grand
renaming in r157403.

llvm-svn: 157413
2012-05-24 20:58:21 +00:00
Ted Kremenek 8fb6723e3a Set svn:keywords property to Id
llvm-svn: 157412
2012-05-24 20:16:00 +00:00
Ted Kremenek e1e89370f0 New & improved man page attached, now with standard license added.
Plus, a patch for scan-build.  

* mdoc corrections
* slightly more compact output
* same license as scan-build
* DESCRIPTION describes
* Default checkers corrected & explained
* Authors credited

The patch adds support for --help-checkers.  It just lists the default
checkers by recursively invoking "scan-build -h" and looking for the
magic '+' signs.  

Patch by James Lowden!

llvm-svn: 157411
2012-05-24 20:13:47 +00:00
Akira Hatanaka a649cc75b3 Turn on mips16 pseudo op when compiling for mips16.
Expand test case for this.

Patch by Reed Kotler.

llvm-svn: 157410
2012-05-24 18:37:43 +00:00
Akira Hatanaka df98a7a34d Enable Mips16 compiler to compile a null program.
First code from the Mips16 compiler. Includes trivial test program.

Patch by Reed Kotler.

llvm-svn: 157408
2012-05-24 18:32:33 +00:00
Fariborz Jahanian 246f519a51 objective-c: Fixes a corner case and interesting bug.
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ 
in their first letter case. // rdar://11363363

llvm-svn: 157407
2012-05-24 18:29:41 +00:00
Meador Inge 6fef6e6466 Adding back a right parenthesis that was dropped in r157388.
llvm-svn: 157406
2012-05-24 18:16:39 +00:00
Johnny Chen a0d4b5da35 Fix missing Resources/Python directory for macosx build.
llvm-svn: 157405
2012-05-24 18:14:18 +00:00