Andrew Trick
9f867fd2dc
Have Program::Wait return -2 for crashed and timeouts instead of embedding
...
info in the error message. Per Dan's request.
llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Eli Friedman
1cbb521f21
Fix up the new StandardPasses to run the same scalarrepl passes as the old one.
...
llvm-svn: 131665
2011-05-19 19:14:54 +00:00
Francois Pichet
8c22442446
Fix the MSVC build.
...
Use a set of overloaded functions instead of template function for CreatePassFn.
It seems that template deduction for functions type that differs only by return type doesn't work with MSVC.
llvm-svn: 131624
2011-05-19 02:54:11 +00:00
Charles Davis
ce8694c82b
Fix build issues with headers, which I discovered by actually using them.
...
Also, convert all the inline functions on UnwindInfo into methods.
llvm-svn: 131622
2011-05-19 02:47:23 +00:00
David Chisnall
ef3c74e551
Some better type safety enforcement in the standard pass list, along with some small tidies and some fixes for bugs that the stricter checking found.
...
llvm-svn: 131592
2011-05-18 22:46:02 +00:00
Eli Friedman
e1ee02ff3d
Third pass at allowing plugins to modify default passes. This time with a tweak so that we don't depend on an uninitialized argument.
...
llvm-svn: 131581
2011-05-18 21:40:04 +00:00
Devang Patel
f1e313af0f
Set debug location while setting insertion point.
...
llvm-svn: 131575
2011-05-18 20:58:47 +00:00
Eli Friedman
530e34b4af
Revert r131556; it's breaking buildbots/clang tests.
...
llvm-svn: 131567
2011-05-18 20:39:27 +00:00
David Chisnall
b2d7afdada
Second pass at allowing plugins to modify default passes. This time without bonus inter-library dependencies.
...
llvm-svn: 131556
2011-05-18 19:00:41 +00:00
Charles Davis
4b65b621f2
Get rid of extern "C" from the Win64 EH header.
...
llvm-svn: 131381
2011-05-15 17:09:26 +00:00
Charles Davis
d2f0eca76c
Add a header containing definitions used to implement Win64 exception handling.
...
llvm-svn: 131380
2011-05-15 14:42:22 +00:00
Devang Patel
dd08ae41c6
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Devang Patel
b865dd6a20
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
...
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Andrew Trick
25d4fce092
Bugpoint support for miscompilations that result in a crash.
...
This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.
llvm-svn: 131186
2011-05-11 16:31:24 +00:00
Nick Lewycky
5a1035a0dc
Revert r131155 for now. It makes VMCore depend on Analysis and Transforms
...
headers.
llvm-svn: 131159
2011-05-10 22:16:06 +00:00
David Chisnall
17ae92b2d8
Add support for plugins add passes to the default set of passes. The standard set of passes used by front ends can now be modified by LLVM plugins, without needing to modify any front ends.
...
Still to do:
- Allow replacing / removing passes (infrastructure there, just needs an infrastructure exposed)
- Defining sets of passes to be added or removed as a group
- Extending the support to allow user-defined groups of optimisations
- Allow plugins to be specified for loading automatically (e.g. from plugins.conf or some similar mechanism)
Reviewed by Nick Lewycky.
llvm-svn: 131155
2011-05-10 21:36:48 +00:00
Nick Lewycky
aed53f33f0
Fix typo. No functional change.
...
llvm-svn: 130949
2011-05-05 21:27:14 +00:00
Ted Kremenek
be5353a070
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
...
llvm-svn: 130885
2011-05-04 23:26:59 +00:00
Devang Patel
7f23f2aba6
If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.
...
llvm-svn: 130874
2011-05-04 21:57:22 +00:00
Duncan Sands
7497273b12
Implement some basic simplifications involving min/max, for example
...
max(a,b) >= a -> true. According to my super-optimizer, these are
by far the most common simplifications (of the -instsimplify kind)
that occur in the testsuite and aren't caught by -std-compile-opts.
llvm-svn: 130780
2011-05-03 19:53:10 +00:00
Ted Kremenek
16f206d185
Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
...
llvm-svn: 130432
2011-04-28 20:34:18 +00:00
Chris Lattner
138dfc6c5f
make a couple of changes to the standard pass pipeline:
...
1. Only run the early (in the module pass pipe) instcombine/simplifycfg
if the "unit at a time" passes they are cleaning up after runs.
2. Move the "clean up after the unroller" pass to the very end of the
function-level pass pipeline. Loop unroll uses instsimplify now,
so it doesn't create a ton of trash. Moving instcombine later allows
it to clean up after opportunities are exposed by GVN, DSE, etc.
3. Introduce some phase ordering tests for things that are specifically
intended to be simplified by the full optimizer as a whole.
This resolves PR2338, and is progress towards PR6627, which will be
generating code that looks similar to test2.
llvm-svn: 130241
2011-04-26 20:45:33 +00:00
Chris Lattner
b8cedffb8d
add an m_ConstantInt matching predicate that binds to a uint64_t, and add an m_OneUse()
...
predicate that matches if the subexpr has a single use.
llvm-svn: 130235
2011-04-26 19:50:39 +00:00
Frits van Bommel
20f0d49a4a
Comment out some unused parameter names to silence out-of-tree -Wunused warnings.
...
llvm-svn: 129988
2011-04-22 11:36:45 +00:00
Devang Patel
5b09b96367
Add DW_OP_bit_piece.
...
llvm-svn: 129945
2011-04-21 22:26:13 +00:00
Chris Lattner
649aa9aa1e
add a helper method.
...
llvm-svn: 129806
2011-04-19 20:47:57 +00:00
Ted Kremenek
7cac5a8369
Add BumpPtrAllocator::getTotalMemory() to allow clients to query how much memory a BumpPtrAllocator allocated.
...
llvm-svn: 129727
2011-04-18 22:44:46 +00:00
Devang Patel
eddab1d186
Introduce support to encode Objective-C property information in debugging information generated for an interface.
...
llvm-svn: 129624
2011-04-16 00:11:51 +00:00
Chris Lattner
0304b82f80
Fix a ton of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Nick Lewycky
80f6aaa390
Use positive values since the value type is unsigned. Fixes a warning on the
...
llvm-gcc-native-mingw32 builder.
llvm-svn: 129457
2011-04-13 18:46:22 +00:00
Nick Lewycky
7ee6960a5f
Make IRBuilder support StringRef for building strings.
...
Also document that the global variables produced are mergable.
llvm-svn: 129330
2011-04-12 00:29:07 +00:00
Chris Lattner
8018f67b28
fix doc comment bug, noticed by Jochen
...
llvm-svn: 129186
2011-04-09 02:33:29 +00:00
Nick Lewycky
fccee4ca24
Add support for ArrayRef in IRBuilder's CreateCall.
...
llvm-svn: 129039
2011-04-07 00:03:25 +00:00
Nick Lewycky
e15c6c11b4
Add an empty key for DebugLoc so that you can store an empty DebugLoc in a
...
DenseMap.
llvm-svn: 128994
2011-04-06 06:49:59 +00:00
Nick Lewycky
dfed8e0ff5
Support using DebugLoc's in a DenseMap.
...
llvm-svn: 128988
2011-04-06 05:36:52 +00:00
Andrew Trick
f275156c40
Fix a typo.
...
llvm-svn: 128912
2011-04-05 19:13:11 +00:00
Andrew Trick
7e2e555075
Added *hidden* flags -print-options and -print-all-options so
...
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.
Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.
llvm-svn: 128910
2011-04-05 18:54:36 +00:00
Frits van Bommel
4efc489131
Remove the LLVMContext& arguments from *Folder constructors, as they don't seem to be used anywhere.
...
llvm-svn: 128793
2011-04-03 19:46:28 +00:00
Michael J. Spencer
b127b18668
Fix whitespace.
...
llvm-svn: 128631
2011-03-31 13:06:39 +00:00
Michael J. Spencer
c96db7725b
Switch FileRemover from PathV1 to V2.
...
llvm-svn: 128630
2011-03-31 13:04:19 +00:00
Jay Foad
53632b7c03
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
...
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Rafael Espindola
9e0fcfc02b
We don't need a null terminator for the output file.
...
llvm-svn: 128098
2011-03-22 19:20:47 +00:00
Ted Kremenek
d582517a58
Properly initialize all fields in CrashReporterCleanupContext. This caused the buildbot failure earlier.
...
llvm-svn: 128071
2011-03-22 04:33:13 +00:00
Ted Kremenek
371ad9a265
Rework CrashRecoveryContextCleanup to provide a simpler way to create cleanup objects, and provide a new cleanup for
...
decrementing reference counts of objects with intrusive reference counts.
llvm-svn: 128055
2011-03-22 01:15:10 +00:00
Ted Kremenek
a462a53e0b
Provide a means for CrashRecovery clients to determine if code is currently running while crash recovery cleanups are being processed.
...
llvm-svn: 128008
2011-03-21 18:38:03 +00:00
Ted Kremenek
c4fa37479a
Tweak CrashRecoveryContextCleanup to provide an easy method for clients to select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant.
...
llvm-svn: 127929
2011-03-19 00:59:37 +00:00
Jim Grosbach
e6c2e66311
Tidy up.
...
llvm-svn: 127883
2011-03-18 16:39:36 +00:00
Ted Kremenek
c7c75361fa
Tweak CrashRecoveryContextCleanup::createCleanup() to use the 'delete' cleanup as opposed to the 'destructor' cleanup (reclaims more memory).
...
llvm-svn: 127865
2011-03-18 03:46:21 +00:00
Ted Kremenek
4a4428a5bc
Add new CrashRecoveryContextCleanup subclass: CrashRecoveryContextDeleteCleanup. This deletes the object, not just calls its destructor.
...
llvm-svn: 127855
2011-03-18 03:04:18 +00:00
Ted Kremenek
1a2fa05e5f
Augment CrashRecoveryContext to have registered "cleanup" objects that can be used to release resources during a crash.
...
llvm-svn: 127849
2011-03-18 02:05:11 +00:00