[llvm] r198160 - Store the global variable that's created so that it's reclaimed afterwards.

Dmitri Gribenko gribozavr at gmail.com
Sun Dec 29 01:47:16 PST 2013


On Sun, Dec 29, 2013 at 10:00 AM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Sun Dec 29 02:00:04 2013
> New Revision: 198160
>
> URL: http://llvm.org/viewvc/llvm-project?rev=198160&view=rev
> Log:
> Store the global variable that's created so that it's reclaimed afterwards.
>
> This plugs a memory leak in ARM's FastISel by storing the GV in Module so that
> it's reclaimed.
> PR17978
>
> Modified:
>     llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=198160&r1=198159&r2=198160&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Sun Dec 29 02:00:04 2013
> @@ -77,6 +77,7 @@ class ARMFastISel : public FastISel {
>
>    /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
>    /// make the right decision when generating code for different targets.
> +  Module &M;
>    const ARMSubtarget *Subtarget;

Please attach the comment back to 'Subtarget'.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the llvm-commits mailing list