Anders Carlsson
b07567c315
Add a premature optimization.
...
llvm-svn: 90532
2009-12-04 03:07:26 +00:00
Anders Carlsson
50f147460a
Add the method directly to the vtable.
...
llvm-svn: 90531
2009-12-04 03:06:03 +00:00
Anders Carlsson
79bce40365
Get rid of the PureVirtualMethods map.
...
llvm-svn: 90530
2009-12-04 02:58:12 +00:00
Anders Carlsson
ddf42c8d80
Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).
...
llvm-svn: 90529
2009-12-04 02:56:03 +00:00
Anders Carlsson
5b3ea9bf1c
Move covariant thunk handling to AppendMethods too.
...
llvm-svn: 90528
2009-12-04 02:52:22 +00:00
Anders Carlsson
86809cd8ab
Move 'this' pointer adjustment thunks to AppendMethods.
...
llvm-svn: 90527
2009-12-04 02:43:50 +00:00
Eli Friedman
4b1942cb8b
Make functions returning a struct indirectly evaluate the returned struct
...
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.
llvm-svn: 90526
2009-12-04 02:43:40 +00:00
Anders Carlsson
495634e5ac
Factor appending methods to a vtable out into a separate function.
...
llvm-svn: 90525
2009-12-04 02:39:04 +00:00
Anders Carlsson
4c837d258f
Get rid of the Thunks struct too.
...
llvm-svn: 90524
2009-12-04 02:26:15 +00:00
Anders Carlsson
c521f952d6
Remove the CovariantThunk struct.
...
llvm-svn: 90523
2009-12-04 02:22:02 +00:00
Anders Carlsson
597c776c41
Remove the GlobalDecl from the Thunk as well.
...
llvm-svn: 90522
2009-12-04 02:14:12 +00:00
Eli Friedman
f3da334da6
Fix for PR5447: teach Evaluate to deal with floating-point conditionals.
...
llvm-svn: 90521
2009-12-04 02:12:53 +00:00
Chris Lattner
1c21aaca06
Small and carefully crafted testcase showing a miscompilation by GVN
...
that I'm working on. This is manifesting as a miscompile of 255.vortex
on some targets. No check lines yet because it fails.
llvm-svn: 90520
2009-12-04 02:12:12 +00:00
Anders Carlsson
8c889abc1a
Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
...
llvm-svn: 90519
2009-12-04 02:11:21 +00:00
Chris Lattner
b63051caf6
add the start of a class used to handle phi translation in memdep and
...
gvn (this is just a skeleton so far). This will ultimately be used
to fix a nasty miscompilation with GVN.
llvm-svn: 90518
2009-12-04 02:10:16 +00:00
Anders Carlsson
cdf1898086
Start populating the VtableMembers structure.
...
llvm-svn: 90517
2009-12-04 02:08:24 +00:00
Ted Kremenek
c7916f9ff2
Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.
...
llvm-svn: 90516
2009-12-04 02:03:51 +00:00
Anders Carlsson
a84b6e85f0
Add a data structure for efficient storing of vtable methods. Not used yet.
...
llvm-svn: 90515
2009-12-04 02:01:07 +00:00
Mike Stump
94d3e9b094
Create yet another helper for Invoke.
...
llvm-svn: 90514
2009-12-04 01:53:15 +00:00
Mike Stump
114ab9f695
Fixup reference binding for catch parameters.
...
Fixup throws and rethrows to use invoke as appropriate.
llvm-svn: 90513
2009-12-04 01:51:45 +00:00
Victor Hernandez
b7176a13a4
Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction
...
llvm-svn: 90512
2009-12-04 01:35:02 +00:00
Bob Wilson
2107eb70d9
Fix a comment typo.
...
llvm-svn: 90511
2009-12-04 01:33:04 +00:00
Eli Friedman
6d11ec8cb8
Update chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
...
probably want to do some sort of performance assessment before enabling it,
though.
llvm-svn: 90510
2009-12-04 01:30:56 +00:00
Ted Kremenek
43d4a899c4
Refactor LocationContext creation logic into a single member template.
...
llvm-svn: 90509
2009-12-04 01:28:56 +00:00
Mike Stump
bcb77c985b
Add some helpers for Invoke to mirror CreateCall helpers.
...
llvm-svn: 90508
2009-12-04 01:26:26 +00:00
Chris Lattner
2bd9609992
add an assert to make it really clear what this is doing. Return singularval as
...
a compile time perf optimization to avoid a load.
llvm-svn: 90507
2009-12-04 01:03:32 +00:00
Ted Kremenek
253882431e
Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.
...
llvm-svn: 90506
2009-12-04 00:50:10 +00:00
Eli Friedman
5efba264cb
Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
...
as a constant integer. Also, some minor cleanup and improvements to the
diagnostics.
llvm-svn: 90504
2009-12-04 00:30:06 +00:00
Ted Kremenek
721fcc007e
constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.
...
llvm-svn: 90503
2009-12-04 00:26:31 +00:00
Jakob Stoklund Olesen
ca9cf65455
Also attempt trivial coalescing for live intervals that end in a copy.
...
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch takes care of a few more cases that r90163 missed.
llvm-svn: 90502
2009-12-04 00:16:04 +00:00
Evan Cheng
e156f611ab
- If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
...
- When reaching value is replaced with another, update the cache as well.
llvm-svn: 90501
2009-12-04 00:09:05 +00:00
John McCall
9f545181f7
When recovering from an invalid forward reference to an enum type in C++,
...
create the enum type in the same scope as you would a record type.
llvm-svn: 90500
2009-12-04 00:07:04 +00:00
Ted Kremenek
0ecd4c7d70
More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.
...
llvm-svn: 90499
2009-12-04 00:05:57 +00:00
Devang Patel
3b666fef67
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
...
llvm-svn: 90498
2009-12-03 23:46:57 +00:00
Victor Hernandez
fa23223d4a
Add ParseInlineMetadata() which can parses metadata that refers to an instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata
...
llvm-svn: 90497
2009-12-03 23:40:58 +00:00
Mike Stump
5f141b75f9
These are done.
...
llvm-svn: 90494
2009-12-03 22:55:42 +00:00
Mike Stump
7398ff0f07
Improve catch parameter bindings for scalar non-pointers. WIP.
...
llvm-svn: 90492
2009-12-03 22:38:15 +00:00
John McCall
064d77b7c2
Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
...
Make it an inner class of Parser to assuage access control.
No functionality change.
llvm-svn: 90491
2009-12-03 22:31:13 +00:00
Jim Grosbach
5f9f721e95
remove out of date FIXME.
...
llvm-svn: 90490
2009-12-03 21:55:01 +00:00
Evan Cheng
b2c1529d8f
Handle undef values properly.
...
llvm-svn: 90489
2009-12-03 21:51:55 +00:00
Evan Cheng
8a19371370
Watch out for PHI instruction with no source operands.
...
llvm-svn: 90488
2009-12-03 21:50:58 +00:00
Bob Wilson
53bdae3802
Fix a comment typo.
...
llvm-svn: 90487
2009-12-03 21:47:07 +00:00
Duncan Sands
bbd6b6ddf4
Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
...
Pointed out by Javier Martinez (who also provided a patch). Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc. Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.
llvm-svn: 90482
2009-12-03 21:37:32 +00:00
Jakob Stoklund Olesen
18c7cbd99b
Clean up some loop logic.
...
llvm-svn: 90481
2009-12-03 20:49:10 +00:00
Eli Friedman
1d6fb1669c
Add recursion guards to ice-checking and evaluation for declrefs, so we
...
don't infinitely recurse for cases we can't evaluate.
llvm-svn: 90480
2009-12-03 20:31:57 +00:00
Ted Kremenek
a3536e23c8
Try to make the output of PlistDiagnostics more deterministic by sorting PathDiagnostics before they are emitted. Fixes <rdar://problem/7439668>.
...
llvm-svn: 90478
2009-12-03 19:35:02 +00:00
Ted Kremenek
4313a9c56a
Convert some methods in PathDiagnostic to return StringRefs instead of std::string&.
...
llvm-svn: 90477
2009-12-03 19:34:02 +00:00
Devang Patel
eb57c59b66
Add support to emit debug info for virtual functions and virtual base classes.
...
llvm-svn: 90474
2009-12-03 19:11:07 +00:00
Dan Gohman
083f229ba2
Print a newline after the Args: line so that unrelated errs() output doesn't
...
end up on the same line.
llvm-svn: 90473
2009-12-03 19:03:18 +00:00
Fariborz Jahanian
6dfc1978ac
A new helper function to set various bits in the class when
...
a new virtual function is declared/instantiated. it is used
in couple of places.
llvm-svn: 90470
2009-12-03 18:44:40 +00:00