Evan Cheng
bf4070756f
Teach if-converter to be more careful with predicating instructions that would
...
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.
llvm-svn: 113570
2010-09-10 01:29:16 +00:00
Ted Kremenek
516484c71e
Update checker build.
...
llvm-svn: 113569
2010-09-10 01:20:17 +00:00
Tom Care
4545b2df42
Added AnalyzerStatsChecker, a path sensitive check that reports visitation statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.
...
llvm-svn: 113568
2010-09-10 00:44:44 +00:00
Eric Christopher
712bd0a604
Fix build error.
...
llvm-svn: 113566
2010-09-10 00:35:09 +00:00
Eric Christopher
860fc9370f
Update comments, reorganize some code, rename variables to be
...
more clear. No functional change.
llvm-svn: 113565
2010-09-10 00:34:35 +00:00
Douglas Gregor
a93ab66331
Add libclang support for label statements, gotos, and taking the
...
address of a label (GNU extension).
llvm-svn: 113564
2010-09-10 00:22:18 +00:00
Eric Christopher
22fd29a94a
64-bit fp loads can come straight out of the constant pool, not as
...
bad as I'd thought.
llvm-svn: 113561
2010-09-09 23:50:00 +00:00
Douglas Gregor
d198047ef3
Add libclang visitation for C99 designated initializers.
...
llvm-svn: 113560
2010-09-09 23:28:23 +00:00
Dan Gohman
6dbbab6895
Discard metadata produced by LLVM 2.7. The value enumeration it used
...
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.
The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.
llvm-svn: 113557
2010-09-09 23:12:39 +00:00
Douglas Gregor
0d4d88cf38
Add libclang visitation for __builtin_offsetof's components (fields
...
and array references).
llvm-svn: 113556
2010-09-09 23:10:46 +00:00
Fariborz Jahanian
e89d03f619
property reference expression used on lhs of assignment
...
follows objective's semantics and is not overload'able
with an assignment operator. Fixes a crash and a missing
diagnostics. Radar 8379892.
llvm-svn: 113555
2010-09-09 23:01:10 +00:00
Ted Kremenek
5cdaeaaa1d
Clean up obtuse wording of checker diagnostic of using an uninitialized value in a function call.
...
Fixes: <rdar://problem/8409480> “warning: Pass-by-value argument in function call is undefined” message can be improved
llvm-svn: 113554
2010-09-09 22:51:55 +00:00
Douglas Gregor
c7d6576d54
When we parse a pragma, keep track of how that pragma was originally
...
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.
llvm-svn: 113553
2010-09-09 22:45:38 +00:00
Daniel Dunbar
e5444a88cd
llvm-mc: Don't crash when using -n and we see a directive before the initial section.
...
- This is annoying, because we have to scatter this check everywhere that could emit real data, but I see no better solution.
llvm-svn: 113552
2010-09-09 22:42:59 +00:00
Daniel Dunbar
43325c4a68
llvm-mc: Make sure we exit != 0 if any errors are encountered.
...
llvm-svn: 113551
2010-09-09 22:42:56 +00:00
Jakob Stoklund Olesen
728941fabc
XFAIL test under valgrind. It is not really our problem if sh is leaking.
...
llvm-svn: 113550
2010-09-09 22:02:13 +00:00
Daniel Dunbar
ccbc45262b
Driver/Darwin: Make the compilation object available in AddLinkArgs.
...
llvm-svn: 113549
2010-09-09 21:51:05 +00:00
Eric Christopher
4bd7047324
SIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
...
some data around and implement a couple of move routines to do this.
llvm-svn: 113546
2010-09-09 21:44:45 +00:00
Douglas Gregor
f3af311382
Teach libclang to walk the base and member initializers of a
...
constructor, in source order. Also introduces a new reference kind for
class members, which is used here (for member initializers) and will
also be used for designated initializers and offsetof.
llvm-svn: 113545
2010-09-09 21:42:20 +00:00
Daniel Dunbar
7ce4686958
Fix typo in diagnostic.
...
llvm-svn: 113542
2010-09-09 21:27:25 +00:00
Daniel Dunbar
859dba6637
Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.
...
llvm-svn: 113541
2010-09-09 21:17:44 +00:00
Dan Gohman
f942e96ed5
MDNodes are not Constants.
...
llvm-svn: 113539
2010-09-09 20:54:24 +00:00
Dan Gohman
0a54da2fce
Print invalid metadata references as <badref>, for consistency with
...
regular value references.
llvm-svn: 113538
2010-09-09 20:53:58 +00:00
Eric Christopher
2cbe0fd956
New "move to fp reg" routine. Use it.
...
llvm-svn: 113537
2010-09-09 20:49:25 +00:00
Eric Christopher
82b05d7206
"Strike that, reverse it." -- Mr. Wonka.
...
Truncate when truncating, extend when extending.
llvm-svn: 113536
2010-09-09 20:36:19 +00:00
Owen Anderson
04cf3fd761
What the loop unroller cares about, rather than just not unrolling loops with calls, is
...
not unrolling loops that contain calls that would be better off getting inlined. This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass. Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.
llvm-svn: 113535
2010-09-09 20:32:23 +00:00
Bill Wendling
324f8b798f
Remove the 'rc' suffix. It indicates a "release candidate" during LLVM release
...
qualification.
llvm-svn: 113534
2010-09-09 20:27:36 +00:00
Eric Christopher
5903c0be2a
Add FPTrunc, fix some bugs where I forgot to update the value map.
...
llvm-svn: 113533
2010-09-09 20:26:31 +00:00
Owen Anderson
6270515918
Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled. After some discussion,
...
there seems to be a better way to achieve the same effect.
llvm-svn: 113528
2010-09-09 20:02:23 +00:00
Owen Anderson
11ab204fdc
r113526 introduced an unintended change to the loop unrolling threshold. Revert it.
...
llvm-svn: 113527
2010-09-09 19:11:57 +00:00
Owen Anderson
b61b1647e2
Fix typo in code to cap the loop code size reduction calculation.
...
llvm-svn: 113526
2010-09-09 19:08:59 +00:00
Owen Anderson
62ea1b718c
Use code-size reduction metrics to estimate the amount of savings we'll get when we unroll a loop.
...
Next step is to recalculate the threshold values given this new heuristic.
llvm-svn: 113525
2010-09-09 19:07:31 +00:00
Ted Kremenek
ff3a4ff6e9
Use FindReportInEquivalenceClass to identify all the nodes used for the trimmed graph (in BugReporter). This fixes a problem where a leak that happened to occur on both an exit() path and a non-exit() path was getting reported with the exit() path (which users don't care about).
...
This fixes:
<rdar://problem/8331641> leak reports should not show paths that end with exit() (but ones that don't end with exit())
llvm-svn: 113524
2010-09-09 19:05:34 +00:00
Eric Christopher
6e3eeba4d9
Basic FP->Int, Int->FP conversions.
...
llvm-svn: 113523
2010-09-09 18:54:59 +00:00
Bruno Cardoso Lopes
e8501a468c
Add one more pattern to fallback movddup
...
llvm-svn: 113522
2010-09-09 18:48:34 +00:00
Dan Gohman
1c5be00ec7
Extend the getDependence query with support for PHI translation.
...
llvm-svn: 113521
2010-09-09 18:37:31 +00:00
Dan Gohman
19d19c525c
Add a getPointerOperand() helper function to VAArgInst, for consistency
...
with LoadInst and StoreInst.
llvm-svn: 113520
2010-09-09 18:32:40 +00:00
Caroline Tice
f20e8239cd
Add comments to InstanceSettings constructors explaining why they have
...
to be set up the way they are. Comment out code that removes pending
settings for live instances (after the settings are copied over).
llvm-svn: 113519
2010-09-09 18:26:37 +00:00
Evan Cheng
367a5df8cf
For each instruction itinerary class, specify the number of micro-ops each
...
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.
This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.
llvm-svn: 113513
2010-09-09 18:18:55 +00:00
Dan Gohman
154cb1437e
Fix this comment.
...
llvm-svn: 113511
2010-09-09 18:04:22 +00:00
Caroline Tice
5c9fdfa46d
Move the ProcessPlugins enum definition from lldb-enumerations.h to
...
Process.h; modify the process.plugins settings variable to use the
correct plugin names.
llvm-svn: 113510
2010-09-09 18:01:59 +00:00
Benjamin Kramer
6c3c349b2b
MCELF: Write relocation fragments in the right endian.
...
- This code is gross, but does the job for now.
llvm-svn: 113509
2010-09-09 18:01:29 +00:00
Roman Divacky
3b727f55aa
Make ELF OS ABI dependent on the OS from target triple.
...
llvm-svn: 113508
2010-09-09 17:57:50 +00:00
Caroline Tice
dd7598578f
Make API calls for setting/getting user settable variables static.
...
Modify Driver to handle SIGWINCH signals and automatically re-set the
term-width variable.
llvm-svn: 113506
2010-09-09 17:45:09 +00:00
Daniel Dunbar
0166c95fdd
Frontend: Add -cxx-system-include option which can be used to specify an
...
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().
llvm-svn: 113505
2010-09-09 17:38:22 +00:00
Daniel Dunbar
1cf2d54987
Fix indentation.
...
llvm-svn: 113504
2010-09-09 17:38:18 +00:00
Daniel Dunbar
4c5301d38e
build: Allow subdir Makefiles to provide an alternate location for the SRCDIR
...
Makefile, which can be used to allow building out of tree sources.
llvm-svn: 113503
2010-09-09 17:38:11 +00:00
Dale Johannesen
0ec303b97b
Move remaining MMX instructions from SSE to MMX.
...
llvm-svn: 113501
2010-09-09 17:13:07 +00:00
Douglas Gregor
9f0e1aa0f2
Simplify template instantiation for C++ exception declarations,
...
eliminating an unnecessary use of TemporaryBase in the process.
llvm-svn: 113500
2010-09-09 17:09:21 +00:00
Owen Anderson
a08318acb2
Refactor code-size reduction estimation methods out of InlineCostAnalyzer and into CodeMetrics. They
...
don't use any InlineCostAnalyzer state, and are useful for other clients who don't necessarily want to use
all of InlineCostAnalyzer's logic, some of which is fairly inlining-specific.
No intended functionality change.
llvm-svn: 113499
2010-09-09 16:56:42 +00:00