1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
Benjamin Kramer
b9f7c3b050 [Support] Make asan poisoning for recyclers more aggressive by also poisoning the 'next' pointer.
llvm-svn: 300882
2017-04-20 20:28:18 +00:00
Benjamin Kramer
1a2dc890dd [Recycler] Add asan/msan annotations.
This enables use after free and uninit memory checking for memory
returned by a recycler. SelectionDAG currently relies on the opcode of a
free'd node being ISD::DELETED_NODE, so poke a hole in the asan poison
for SDNode opcodes. This means that we won't find some issues, but only
in SDag.

llvm-svn: 300868
2017-04-20 18:29:37 +00:00
Benjamin Kramer
7999e6045a Retire llvm::alignOf in favor of C++11 alignof.
No functionality change intended.

llvm-svn: 284733
2016-10-20 15:02:18 +00:00
Duncan P. N. Exon Smith
b5929cfe1f Support: Stop using iplist in Recycler
Recycler just needs a singly-linked list, and it takes less (and
simpler) code to hand-roll one of those than to build up the equivalent
`iplist_traits`.  In theory, this should speed things up a bit too, but
this is really just a drive-by cleanup so I haven't measured.

llvm-svn: 249615
2015-10-07 20:49:09 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Chandler Carruth
d37eb83879 [Allocator] Stop forward-declaring BumpPtrAllocator in a few places.
This is a necessary step to lifting some of its configuration into
template parameters rather than runtime parameters.

llvm-svn: 205140
2014-03-30 11:36:29 +00:00
Benjamin Kramer
9345ba0e3e Make some assertions on constant expressions static.
llvm-svn: 204011
2014-03-15 18:47:07 +00:00
Jakob Stoklund Olesen
4c9d7d3d77 Special case Recycler::clear(BumpPtrAllocator).
A BumpPtrAllocator has an empty Deallocate() method, but
Recycler::clear() would still call it for every single object ever
allocated, bringing all those objects into cache. As a bonus,
iplist::remove() will also write to the Prev/Next pointers on all the
objects, so all those cache lines have to be written back to RAM before
the pages are given back to the OS.

Stop wasting time and memory bandwith by using the new
clearAndLeakUnsafely() function to jettison all the recycled objects.

llvm-svn: 171541
2013-01-04 22:35:45 +00:00
Craig Topper
e18a06be4d Convert assert(0) to llvm_unreachable
llvm-svn: 149849
2012-02-05 22:14:15 +00:00
Duncan Sands
750b1f5de2 Public and private corrections, warned about by icc (#304).
Patch by Erick Tryzelaar.

llvm-svn: 81107
2009-09-06 08:55:57 +00:00
Gabor Greif
5291d4d65b ooops, forgot to include the pointless-write eliminator in my previous checkin
llvm-svn: 66081
2009-03-04 21:54:31 +00:00
Gabor Greif
9a8e64c76f Give sentinel traits the right to determine the policy where the sentinel is kept.
This should result in less indirect memory accesses, less dead writes and tighter code.

llvm-svn: 66061
2009-03-04 20:36:44 +00:00
Dan Gohman
9653b21dc2 Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.

Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.

Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.

llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Bill Wendling
7e2acf0dc9 Pull r53428 from Gaz into mainline:
Remove warnings about unused/shadowed variables.

llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Dan Gohman
c3f346dc55 Tidy up #includes.
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
60e964b34c Add some basic Pool-allocation infrastructure. This adds a Recycler class,
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.

llvm-svn: 53210
2008-07-07 22:58:06 +00:00