[llvm-commits] [hlvm] r38136 - in /hlvm/trunk: build/ hlvm/AST/ hlvm/Base/ hlvm/CodeGen/ hlvm/Pass/ hlvm/Reader/XML/ hlvm/Writer/XML/ tools/hlvm-compiler/ tools/hlvm-xml2xml/ tools/hlvm/
Chris Lattner
clattner at apple.com
Sat Jul 7 23:46:33 PDT 2007
On Jul 7, 2007, at 5:00 PM, Reid Spencer wrote:
> ======================================================================
> ========
> --- hlvm/trunk/hlvm/Base/Pool.h (added)
> +++ hlvm/trunk/hlvm/Base/Pool.h Sat Jul 7 19:00:11 2007
> @@ -0,0 +1,127 @@
> +#ifndef HLVM_BASE_POOL_H
> +#define HLVM_BASE_POOL_H
> +
> +#ifdef HLVM_DEBUG
> +#define HLVM_STRINGIZE(X) #X
> +#define HLVM_NEW(pool,type,args) \
> + (::new(pool,__FILE__ ":" HLVM_STRINGIZE(__LINE__)) type args )
> +#else
> +#define HLVM_NEW(pool,type,args) \
> + (::new(pool) type args )
> +#endif
These seems like the wrong place to put these macros, they should be
someplace more common in hlvm.
> +#include <string>
> +
> +namespace hlvm {
> +
> +/// A memory pool abstraction. This is the is is the master pool
> of all XPS
> +/// allocated pools and generally the one used to allocate APRish
> stuff into.
> +/// Note that this doesn't exist until after the call to initialize()
> +/// @brief The memory pool for HLVM.
> +class Pool {
Which is it: XPS or HLVM? Why not use the llvm Support/Allocator.h
interface? What do pools give you? Have you actually profiled this
and found any advantage?
-Chris
More information about the llvm-commits
mailing list