[llvm-commits] [llvm] r56628 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp lib/Target/CellSPU/SPUAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86ATTAsmPrint

Bill Wendling isanbard at gmail.com
Thu Sep 25 18:15:07 PDT 2008


On Thu, Sep 25, 2008 at 5:45 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> On Sep 25, 2008, at 5:28 PM, Bill Wendling wrote:
>> +  /// ConstructDefaultScope - Construct a default scope for the
>> subprogram.
>> +  ///
>> +  void ConstructDefaultScope(MachineFunction *MF) {
>> +    // Find the correct subprogram descriptor.
>> +    std::vector<SubprogramDesc *> Subprograms;
>> +    MMI->getAnchoredDescriptors<SubprogramDesc>(*M, Subprograms);
>> +
>> +    for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) {
>> +      SubprogramDesc *SPD = Subprograms[i];
>> +
>> +      if (SPD->getName() == MF->getFunction()->getName()) {
>
> There has got to be a better way?! This is slow.
>
Yeah, it's a mess. I suppose that I could create a map from the name
to the subprogram descriptor in MMI. That's the only way the
information is carried.

What do you think?

-bw



More information about the llvm-commits mailing list