[llvm-commits] [llvm] r73201 - in /llvm/trunk: include/llvm/Target/TargetELFWriterInfo.h lib/CodeGen/ELF.h lib/CodeGen/ELFCodeEmitter.cpp lib/CodeGen/ELFWriter.cpp lib/CodeGen/ELFWriter.h lib/Target/X86/X86ELFWriterInfo.cpp lib/Target/X86/X86ELFW
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Wed Jul 1 09:55:25 PDT 2009
Hi Chris,
> Is it possible to forward declare this stuff instead of including it? If
> you move the getFunctionAlignment method out of line it will help.
I already did this in some subsequent commit
>> + /// getFunctionAlignment - Returns the alignment for function 'F',
>> targets
>> + /// with different alignment constraints should overload this method
>> + virtual unsigned getFunctionAlignment(const Function *F) const {
>> + const TargetData *TD = TM.getTargetData();
>> + unsigned FnAlign = F->getAlignment();
>> + unsigned TDAlign = TD->getPointerABIAlignment();
>> + unsigned Align = std::max(FnAlign, TDAlign);
>> + assert(!(Align & (Align-1)) && "Alignment is not a power of two!");
>> + return Align;
>
> Bill just committed a patch to move Function Alignment information into
> MachineFunction. Can you change this to just read that information instead
> of inferring an alignment in the writer-specific code?
Nice, I'll do that
>> +++ llvm/trunk/lib/CodeGen/ELF.h Thu Jun 11 14:16:03 2009
>> @@ -21,12 +21,12 @@
>> #ifndef CODEGEN_ELF_H
>> #define CODEGEN_ELF_H
>>
>> +#include "llvm/GlobalVariable.h"
>> #include "llvm/CodeGen/MachineRelocation.h"
>> #include "llvm/Support/DataTypes.h"
>> #include <cstring>
>
> Likewise, please try to shrink down #includes where possible. This should
> not need to include GlobalVariable.h.
Ok!
Thanks Chris,
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
More information about the llvm-commits
mailing list