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
Rafael Espindola
3ecf930d14
Use RequiresNullTerminator to create buffers without a null terminator
...
instead of copying.
llvm-svn: 127835
2011-03-17 22:18:42 +00:00
John McCall
cb1d6e9690
Version N of the llvm_unreachable patch: VC++ doesn't recognize that abort()
...
doesn't return, so just go back to using the old runtime function instead
of trying to use abort() when __builtin_unreachable (or an equivalent) isn't
supported.
llvm-svn: 127629
2011-03-14 22:41:50 +00:00
John McCall
952cbb2634
Okay, some compilers complain if you provide the exception-specification
...
where none was before. Just don't declare it and hope it's declared
in every translation unit that needs it.
llvm-svn: 127612
2011-03-14 20:20:29 +00:00
John McCall
46f704310d
Fix the exception-specification of abort() when declaring it in C++.
...
llvm-svn: 127610
2011-03-14 20:10:50 +00:00
John McCall
fe51bf5de7
Make llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
...
builds, which was the apparent consensus of PR8973 and llvmdev.
llvm-svn: 127608
2011-03-14 20:01:21 +00:00
Mikhail Glushenkov
5a7b935681
Emacs mode string.
...
llvm-svn: 127576
2011-03-14 04:20:57 +00:00
Rafael Espindola
a271db1a12
Add r127409 back now that the windows file was updated.
...
llvm-svn: 127417
2011-03-10 18:33:29 +00:00
Jakob Stoklund Olesen
891bfab351
Revert r127409 which broke all the Windows bots.
...
llvm-svn: 127413
2011-03-10 18:01:43 +00:00
Rafael Espindola
b7a2d86ef5
Add support for MemoryBuffers that are not null terminated and add
...
support for creating buffers that cover only a part of a file.
llvm-svn: 127409
2011-03-10 16:10:30 +00:00
Dan Gohman
b62daa9ec3
Make pred_iterator DefaultConstructible, and add an accessor to
...
retrieve the underlying getOperandNo() value.
llvm-svn: 126804
2011-03-02 00:11:28 +00:00
Dan Gohman
4694b04817
Escape graph edge labels.
...
llvm-svn: 126788
2011-03-01 22:12:24 +00:00
Dan Gohman
ec55e3d750
Remove the showline argument from the SMDiagnostic constructor
...
which constructs a diagnostic with no line to show.
llvm-svn: 126787
2011-03-01 22:11:52 +00:00
Dan Gohman
bf282415a2
Code simplification.
...
llvm-svn: 126786
2011-03-01 22:07:55 +00:00
Dan Gohman
c6cda9defe
Change directory_entry::path() to return a const std::string & instead of
...
a StringRef, for the benefit of clients that want the result as a
nul-terminated string. Clients that expect a StringRef will get one via
the implicit conversion.
llvm-svn: 126784
2011-03-01 22:07:09 +00:00
Chris Lattner
877ce8549d
add a missing const qualifier for consistency.
...
llvm-svn: 126742
2011-03-01 08:36:21 +00:00
Tobias Grosser
789fab6b30
Pass the graph to the DOTGraphTraits.getEdgeAttributes().
...
This follows the interface of getNodeAttributes.
llvm-svn: 126562
2011-02-27 04:11:03 +00:00
Nick Lewycky
ed7f556f44
Update the NoFolder to work with current IRBuilder.
...
llvm-svn: 126479
2011-02-25 07:13:35 +00:00
Michael J. Spencer
3c784e25d6
Depricate PathV1::isAbsolute.
...
llvm-svn: 126348
2011-02-24 01:02:32 +00:00
Devang Patel
918feedd44
Remove unused tag.
...
llvm-svn: 125988
2011-02-18 23:23:09 +00:00
Devang Patel
7bc042d9d4
Provide tag strings for llvm specific tags.
...
llvm-svn: 125986
2011-02-18 23:06:29 +00:00
Chris Lattner
9f386640da
Now that -loop-idiom uses TargetLibraryInfo properly, it doesn't
...
need to be pulled out of the pass manager when the user specifies
-fno-builtin. It can intelligently determine which libcalls to
optimize based on what is enabled in TargetLibraryInfo. This
allows -fno-builtin-foo to work someday.
llvm-svn: 125981
2011-02-18 22:36:36 +00:00
Chris Lattner
2d216b82ee
rearrange some comments, no functionality change.
...
llvm-svn: 125972
2011-02-18 22:21:07 +00:00
Nick Lewycky
5c854580b2
Teach PatternMatch that splat vectors could be floating point as well as
...
integer. Fixes PR9228!
llvm-svn: 125613
2011-02-15 23:13:23 +00:00
Zhanyong Wan
c1bc219fc1
Adds llvm::sys::path::is_separator() to test whether a char is a path separator
...
on the host OS. Reviewed by dgregor.
llvm-svn: 125406
2011-02-11 21:24:40 +00:00
Chris Lattner
63f1d56458
switch the constantexpr, target folder, and IRBuilder interfaces
...
for NSW/NUW binops to follow the pattern of exact binops. This
allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW);
llvm-svn: 125270
2011-02-10 07:01:55 +00:00
Douglas Gregor
0044fad1e6
Rip out realpath() support. It's expensive, and often a bad idea, and
...
I have another way to achieve the same goal.
llvm-svn: 125239
2011-02-09 23:33:15 +00:00
Douglas Gregor
75fafed2fd
Add llvm::sys::path::canonical(), which provides the canonicalized
...
name of a path, after resolving symbolic links and eliminating excess
path elements such as "foo/../" and "./".
This routine still needs a Windows implementation, but I don't have a
Windows machine available. Help? Please?
llvm-svn: 125228
2011-02-09 22:11:23 +00:00
Chris Lattner
7468ab4b90
Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/Exact
...
versions of creation functions. Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.
Do a massive rewrite of much of pattern match. It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.
Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.
llvm-svn: 125194
2011-02-09 17:00:45 +00:00
Chris Lattner
8a576b802f
enrich folder interfaces around exactness.
...
llvm-svn: 125191
2011-02-09 16:44:36 +00:00
Rafael Espindola
43f9672afa
Don't open the file again in the gold plugin. To be able to do this, update
...
MemoryBuffer::getOpenFile to not close the file descriptor.
llvm-svn: 125128
2011-02-08 22:40:47 +00:00
Duncan Sands
7c3f34d524
Add an m_Div pattern for matching either a udiv or an sdiv and use it
...
to simplify the "(X/Y)*Y->X when the division is exact" transform.
llvm-svn: 125004
2011-02-07 09:36:32 +00:00
Duncan Sands
edd8383ed9
Add IRBuilder methods for creating an exact udiv, like for exact sdiv.
...
llvm-svn: 125002
2011-02-07 09:21:52 +00:00