summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Use.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange operands of the BranchInst, to be able toGabor Greif2009-03-121-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | access each with a fixed negative index from op_end(). This has two important implications: - getUser() will work faster, because there are less iterations for the waymarking algorithm to perform. This is important when running various analyses that want to determine callers of basic blocks. - getSuccessor() now runs faster, because the indirection via OperandList is not necessary: Uses corresponding to the successors are at fixed offset to "this". The price we pay is the slightly more complicated logic in the operator User::delete, as it has to pick up the information whether it has to free the memory of an original unconditional BranchInst or a BranchInst that was originally conditional, but has been shortened to unconditional. I was not able to come up with a nicer solution to this problem. (And rest assured, I tried *a lot*). Similar reorderings will follow for InvokeInst and CallInst. After that some optimizations to pred_iterator and CallSite will fall out naturally. llvm-svn: 66815
* another fix to my previous commit:Gabor Greif2009-01-051-2/+5
| | | | | | | * some picky <g> compilers get insulted by const-incorrectness * respect 80-char limit llvm-svn: 61701
* eliminate tabs from my previous commitGabor Greif2009-01-051-4/+4
| | | | llvm-svn: 61695
* Get rid of the tagging functions and use PointerIntPair.Gabor Greif2009-01-051-10/+13
| | | | | | | | | This means that we have to include an additional header. This patch should be functionally equivalent. I cannot outrule any performance degradation, though I do not expect any. llvm-svn: 61694
* Introduce a typing refinenement on tagged dataGabor Greif2008-10-161-5/+3
| | | | | | | | | | | | using the 'volatile' qualifier. This should not have any operational consequences on code, because tags should always be stripped off (giving a non-volatile pointer) before dereferencing. The new qualification is there to catch some attempts to use tagged pointers in a context where an untagged pointer is appropriate. Notably this approach does not catch dereferencing of tagged pointers, but helps in separating the two concepts a bit. llvm-svn: 57641
* backing out my last commit, it was not intended to go on the trunkGabor Greif2008-09-191-34/+9
| | | | llvm-svn: 56349
* first shot at removing Use::ValGabor Greif2008-09-191-9/+34
| | | | | | untested, Use::swap() is definitely not done yet llvm-svn: 56348
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-2/+4
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Merge of r51073-51074 from use-diet branch.Gabor Greif2008-05-131-0/+29
| | | | | | | | | | | Do not rely on std::swap<Use>, provide a (faster) member function instead. This change is primarily necessitated by MSVC++'s incompatibility with declaring std::swap<Use> to be a friend of Use. Also contains some minor tweaks to Use inline functions, to undo pointless changes that sneaked in with the last merge. llvm-svn: 51078
* merge of use-diet branch to trunkGabor Greif2008-05-101-0/+131
llvm-svn: 50943
OpenPOWER on IntegriCloud