LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 576 - [bugpoint] JIT debugger generates really inefficient function stubs
Summary: [bugpoint] JIT debugger generates really inefficient function stubs
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: bugpoint (show other bugs)
Version: 1.3
Hardware: All All
: P enhancement
Assignee: Chris Lattner
URL:
Keywords: quality-of-implementation
Depends on:
Blocks:
 
Reported: 2005-06-09 22:47 PDT by Chris Lattner
Modified: 2010-02-22 12:41 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2005-06-09 22:47:30 PDT
Bugpoint has to emit function stubs that call getPointerToNamedFunction to find code generated by the 
JIT.  It would be nice if it only did this the first time it was called.  Instead of emitting:

internal void %l33_main_no_exit_2E_i305_2E_i_wrapper(sbyte*, uint*) {
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([30 x sbyte]* %
l33_main_no_exit_2E_i305_2E_i_name, int 0, int 0) )            ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (sbyte*, uint*)*          ; <void (sbyte*, uint*)*> 
[#uses=1]
        call void %resolverCast( sbyte* %0, uint* %0 )
        ret void
}

we would like to use something like a static var to remember this.  This should be done in 
Miscompilation.cpp:CleanupAndPrepareModules.

-Chris
Comment 1 Chris Lattner 2005-06-09 22:47:56 PDT
Oh yeah, this would make JIT debugging like 3x faster on some programs.

:)

-Chris
Comment 2 Chris Lattner 2005-07-11 20:02:35 PDT
This enhancement is now implemented, patch here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050711/026997.html

-Chris