logo       


r9839 - branches/llvm-backend: msg#00013

Subject: r9839 - branches/llvm-backend
Author: gabor
Date: Thu Apr 14 19:20:21 2005
New Revision: 9839

Modified:
   branches/llvm-backend/cback.dylan
Log:
job: 7142
some experimental code for
<return> and <compound-region>s


Modified: branches/llvm-backend/cback.dylan
==============================================================================
--- branches/llvm-backend/cback.dylan   (original)
+++ branches/llvm-backend/cback.dylan   Thu Apr 14 19:20:21 2005
@@ -424,6 +424,7 @@
 define method emit-region
     (backend == llvm:, region :: <region>, file :: <file-state>)
     => ();
+  compiler-warning("region: #########----> %=", region);
 
 end;
 
@@ -449,24 +450,53 @@
      bb :: <llvm-basic-block>)
     => ();
 
+
+make(<llvm-return-instruction>, atEnd: bb)
+
+
 end;
 
 
 define variable llvm-function = #f;
 
+
 define method emit-region
     (backend == llvm:, region :: <simple-region>, file :: <file-state>)
     => ();
+  let bb = make(<llvm-basic-block>, name: "body", into: llvm-function);
+
   for (assign = region.first-assign then assign.next-op,
        while: assign)
-
-    let bb = make(<llvm-basic-block>, name: "body", into: llvm-function);
-    emit-llvm-assignment(assign.defines, assign.depends-on.source-exp, 
+    emit-llvm-assignment(assign.defines,
+                        assign.depends-on.source-exp, 
                         assign.source-location, bb);
   end for;
 end;
 
 
+define method emit-region (backend == llvm:,
+                          region :: <compound-region>,
+                          file :: <file-state>)
+    => ();
+  for (subregion in region.regions)
+    emit-region(backend, subregion, file);
+    // ## use reduce?
+  end;
+end;
+
+
+define method emit-region (backend == llvm:, return :: <return>, file :: 
<file-state>)
+    => ();
+  /* ### emit-joins(region.join-region, file); */
+  let function :: <fer-function-region> = return.block-of;
+  let function-info = get-info-for(function, file);
+  let result-rep = function-info.function-info-result-representation;
+  let bb = make(<llvm-basic-block>, name: "body", into: llvm-function);
+  emit-llvm-return(return, result-rep, bb);
+end;
+
+
+
 define function representation-llvm-type(rep)
 // very inefficient! ###
   select(rep.representation-c-type by \=)
@@ -549,8 +579,6 @@
   
 
   llvm-function := f;
-///  let arg = make(<llvm-argument>, type: inttype, name: "foo", func: f);
-
 
   let max-depth = analyze-stack-usage(function);
   emit-region(backend, function.body, file);
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe